new < oql$db > Person();will create a Person instance in the database pointed by oql$db, which is in fact the current database.
name lastname addr.street addr.town[3] spouse.name
| General Information | |
| Operator | new |
| Syntax | new [<[expr]>] class_name({path_expression : expr }) |
| Type | n-ary |
| Operand Types | any type |
| Result Type | oid or object |
| Functions | creates an persistent or transient object |
| Expression Examples | |
| expression | result |
john := new Person(name: "john",
lastname: "wayne",
age : fib(10));
|
returns the oid of the created Person instance |
new Person(name: "mary",
lastname: "poppins",
addr.town : "jungle",
addr.street[0] : 'a',
addr.street[1] : 'b',
spouse : john,
spouse.age : 72
);
|
returns the oid of the created Person instance |