General Information | |
Operator | bodyof |
Syntax | classof expr |
Type | unary |
Operand Type | ident denoting a function |
Result Type | string |
Function | returns the body of the function |
Expression Examples | |
bodyof is_int | "is_int(x) ((typeof x)=="integer")" |
bodyof first | "first(l) { if (((!is_list(l))&&(!is_array(l)))) return l; start:=0; f:=nil; for (x in l) if ((start==0)) { start:=1; f:=x; break; }; ; return f; }" |
bodyof 1 | raises an error |
General Information | |
Operator | structof |
Syntax | structof expr |
Type | unary |
Operand Type | struct |
Result Type | a list of strings |
Function | returns the meta-type of the operand |
Expression Examples | |
structof struct(alpha : 1, beta : 2) | list("alpha", "beta") |
structof first(select struct(x: x.firstname) from Person x) | list("x") |
structof 1 | raises an error |
General Information | |
Operator | [!] |
Syntax | expr [!] |
Type | unary |
Operand Type | string, collection or struct |
Result Type | a int |
Function | returns length of the operand |
Expression Examples | |
(select Person)[!] | the number of person instances |
(struct(a: 1, b:2, c: "hello"))[!] | 3 |
("hello"+"world")[!] | 10 |
"hello"+"world"[!] | raises an error |
General Information | |
Operator | import |
Syntax | import expr |
Type | unary |
Operand Type | string |
Result Type | a string |
Function | import the file |
Expression Examples | |
import "stdlib" | "/usr/local/eyedb/etc/so/stdlib.oql" |
import "roudoudou" | raises an error: cannot find file 'roudoudou' |
EyeDB manual