next up previous contents
Next: Propagate Specification Up: The Object Definition Language Previous: Class Body Specification   Contents

Subsections


Attribute Specification


attr_dcl 		 : <identifier>[ref] <identifier>[array] [inverse] ;

| coll_spec [ref] <identifier>[array] [inverse] ;


Reference Qualifier


ref 		 : *

| &
The reference type qualifier denoted by * or &, indicates that the attribute refers to an object in the database of the indicated type.

For instance the attribute field Person *spouse, means that spouse is an object of type Person, while Address addr means that addr is an attribute of type Address but not an object of the database: it is fully included in the structure Person.

The attribute spouse is called an indirect attribute, while addr is called an direct attribute.

Do not confuse the * ODL meaning and the * C/C++ meaning.

In C/C++, the * type modifier denotes an address to an area of the indicated type instances: it is a pointer to an address. This pointer can be incremented and decremented to change its location in the area.
In ODL, the * denotes a reference to one and only one object, it is why the & token is also accepted, although the meaning of this token is a little bit different in C++.

So, in ODL the construct Person **x makes no sense, in the same manner that the construct Person &&x makes no sense in C++.


Array Qualifier


array 		 : [ [expr_int] ]

| array [ [expr_int] ]


Collection Type Specification


coll_spec 		 : <identifier>< <identifier>[ expr_int ] >

| <identifier>< <identifier>[ref] >
| <identifier>< coll_spec [ref] >
| <identifier>< coll_spec [ expr_int ] >


Attribute Hint Specification


attr_hint 		 : index

| notnull
| implementation
| card


Index Specification


index 		 : index on attr_path

| index < index_spec > on attr_path
| index < propagate > on attr_path
| index < index_spec , propagate> on attr_path

index_spec : btree
| hash
| type = btree
| type = hash
| hints = hints_spec

hints_spec : [key_count = <integer>;]






Unique Specification


unique 		 : constraint < unique >


Notnull Specification


notnull 		 : constraint < notnull >


Implementation Specification


implementation 		 : implementation < index_spec > on attr_path

| implementation < propagate > on attr_path
| implementation < index_spec , propagate > on attr_path


next up previous contents
Next: Propagate Specification Up: The Object Definition Language Previous: Class Body Specification   Contents
EyeDB manual