Subsections


The eyedbodl tool

The eyedbodl tool can be used to: For instance, let schema.odl an ODL file and dbtest a database.


Updating a schema

To update a database from an ODL file:
eyedbodl -u -d dbtest schema.odl
or:
eyedbodl --update --database=dbtest schema.odl
Important notes:


Generates C++ code

To generate the C++ API from an ODL file:
eyedbodl --gencode=C++ schema.odl
To generate the C++ API from a database:
eyedbodl --gencode=C++ --package=schema -d dbtest
For a given package.odl ODL file, the generated files are as follows:


Generates Java code

To generate the Java API from an ODL file:
eyedbodl --gencode=Java schema.odl
To generate the Java API from a database:
eyedbodl --gencode=Java --package=schema -d dbtest
For a given package.odl ODL file, the package directory contains a Java file for each class defined in the ODL file plus a Java file for each collection template class used as an attribute in classes of the ODL file.


Generates ODL

To generate the ODL from a database:
eyedbodl --gencode=ODL -d dbtest # generates on the standard ouput
eyedbodl --gencode=ODL -d dbtest -o schema.odl


Display schema differences

To display the difference between a schema in an ODL file and a database schema:
eyedbodl --diff schema.odl -d dbtest


Checking the syntax of an ODL file

To check the syntax of an ODL file:
eyedbodl --checkfile schema.odl

Beside these major options, eyedbodl has a lot of extra options as described when running eyedbodl with the -help option.

EyeDB manual