Skip to main content


The data that the system internally uses for maintaining the database is exposed to OSQL and can be queried in terms of types and functions as other data. For example, the types and functions used in the database are accessible through system functions, so it is possible to search the database for types and functions and how they relate.

Accessing function signatures

The function arguments returns a vector describing arguments of signature of resolvent r:

   arguments(Function r) -> Bag of Vector`

Each element in the vector is a triplet (vector) describing one of the arguments with structure [type,name,uniqueness] where type is the type of the argument, name is the name of the argument, and uniqueness is either key or nonkey depending on the declaration of the argument.



returns the vector of vectors

   [ [#[OID 371 "TIMEVAL"],"TV1","nonkey"],
[#[OID 371 "TIMEVAL"],"TV2","nonkey"] ]`

Analogous to arguments(f) the function results(f) returns a description of the results of function f:

   results(Function r) -> Bag of Vector

System functions

String identifying the current version of sa.engine:

system_version() -> Charstring

Quit sa.engine:


If the system is registered as a peer it will be removed from the name server.

The redirect statement reads OSQL statements from a file:

redirect-stmt ::= '<' string-constant


   < 'person.osql';

Load a master file, filename, containing an OSQL script defining a subsystem:

   loadSystem(Charstring dir, Charstring filename)->Charstring

The current directory is temporarily set to dir while loading. The file is not loaded if it was previously loaded into the database. To see what master files are currently loaded, call:

   loadedSystems() -> Bag of Charstring

The value of OS environment variable var.

   getenv(Charstring var)->Charstring value

Generates an error of variable not set.

Print an error message msg on the console and raises an exception:

   error(Charstring msg) -> Boolean




Database indexing

System meta-data

Query optimization