Current section
Files
Jump to
Current section
Files
lib/dsl/function/names.ex
defmodule Durango.Dsl.Function.Names do
@functions [
#{name, arity}
# https://docs.arangodb.com/3.3/AQL/Functions/TypeCast.html
document: 1,
document: 2,
collections: 0,
has: 2,
to_bool: 1,
to_number: 1,
to_string: 1,
to_array: 1,
to_list: 1,
is_null: 1,
is_bool: 1,
is_number: 1,
is_string: 1,
is_array: 1,
is_list: 1,
is_object: 1,
is_document: 1,
is_datestring: 1,
typename: 1,
# https://docs.arangodb.com/3.3/AQL/Functions/String.html
char_length: 1,
concat: 1..255,
concat_separator: 2..255,
contains: 2..3,
count: 1,
lenght: 1,
find_first: 2..4,
find_last: 2..4,
json_parse: 1,
json_stringify: 1,
left: 2,
like: 2..3,
lower: 1,
ltrim: 1..2,
md5: 1,
random_token: 1,
regex_test: 2..3,
regex_replace: 3..4,
reverse: 1,
right: 2,
rtrim: 1..2,
sha1: 1,
split: 2..3,
substitute: 2..4,
substring: 2..3,
trim: 1..2,
upper: 1,
# https://docs.arangodb.com/3.3/AQL/Functions/Numeric.html
abs: 1,
acos: 1,
asin: 1,
atan: 1..2,
atan2: 2,
average: 1,
ceil: 1,
cos: 1,
degrees: 1,
exp: 1,
exp2: 1,
floor: 1,
log: 1,
log2: 1,
log10: 1,
max: 1,
median: 1,
min: 1,
percentile: 2..3,
pi: 0,
pow: 2,
radians: 1,
rand: 0,
range: 2..3,
round: 1,
sin: 1,
sqrt: 1,
stddev_population: 1,
stddev_sample: 1,
sum: 1,
tan: 1,
variance_population: 1,
variance_sample: 1,
date_now: 0,
date_iso8601: 1,
date_timestamp: 1,
date_dayofweek: 1,
date_year: 1,
date_month: 1,
date_day: 1,
date_hour: 1,
date_minute: 1,
date_second: 1,
date_millisecond: 1,
date_dateofyear: 1,
date_isoweek: 1,
date_leapyear: 1,
date_quarter: 1,
date_days_in_month: 1,
date_format: 2,
date_add: 3,
date_subtract: 3,
date_diff: 3..4,
date_compare: 3..4,
# https://docs.arangodb.com/3.3/AQL/Functions/Array.html
append: 2..3,
first: 1,
flatten: 1..2,
intersection: 2..255,
last: 1,
minus: 2..255,
nth: 2,
outersection: 2..255,
pop: 1,
position: 2..3,
push: 2..3,
remove_nth: 2,
remove_value: 2..3,
remove_values: 2,
reverse: 1,
shift: 1,
slice: 2..3,
union: 2..255,
union_distinct: 2..255,
unique: 2..255,
unshift: 2..3,
# https://docs.arangodb.com/3.3/AQL/Functions/Document.html
attributes: 1..3,
has: 2,
is_same_collection: 2,
keep: 2..255,
matches: 2..3,
merge: 1..255,
merge_recursive: 1..255,
parse_identifier: 1,
translate: 2..3,
unset: 2..255,
unset_recursive: 2..255,
values: 1..2,
zip: 2,
near: 3..5,
within: 4..5,
within_rectangle: 5,
distance: 4,
is_in_polygon: 3,
# https://docs.arangodb.com/3.3/AQL/Functions/Fulltext.html
fulltext: 3..4,
# https://docs.arangodb.com/3.3/AQL/Functions/Miscellaneous.html
not_null: 1..255,
first_list: 1,
first_document: 1,
collection_count: 1,
current_user: 0,
hash: 1,
fail: 1,
call: 2,
apply: 2,
noopt: 1,
passthru: 1,
sleep: 1,
v8: 1,
]
def functions(), do: @functions
def names_list(), do: Keyword.keys(@functions)
end