00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 enum database_open_mode [OqlCtbDatabaseOpenMode] {
00031 DBREAD [DBRead] = 0x2,
00032 DBRW [DBRW] = 0x4,
00033
00034 DBADMIN [DBAdmin] = 0x10,
00035 DBOPENLOCAL [DBOpenLocal] = 0x20
00036 };
00037
00038 enum lock_mode [OqlCtbLockMode] {
00039 DEFAULT_LOCK [DefaultLock],
00040 LOCK_N [LockN],
00041 LOCK_X [LockX],
00042 LOCK_SX [LockSX],
00043 LOCK_S [LockS],
00044 LOCK_P [LockP]
00045 };
00046
00047 enum transaction_mode [OqlCtbTransactionMode] {
00048 TRANSACTION_OFF [TransactionOff] = 1,
00049 TRANSACTION_ON [TransactionOn]
00050 };
00051
00052 enum transaction_lockmode [OqlCtbTransactionLockMode] {
00053 READS_WRITES [ReadSWriteS] = 1,
00054 READS_WRITESX [ReadSWriteSX],
00055 READS_WRITEX [ReadSWriteX],
00056 READSX_WRITESX [ReadSXWriteSX],
00057 READSX_WRITEX [ReadSXWriteX],
00058 READX_WRITEX [ReadXWriteX],
00059 READN_WRITES [ReadNWriteS],
00060 READN_WRITESX [ReadNWriteSX],
00061 READN_WRITEX [ReadNWriteX],
00062 READN_WRITEN [ReadNWriteN],
00063 DATABASEX [DatabaseX]
00064 };
00065
00066 enum recovery_mode [OqlCtbRecoveryMode] {
00067 RECOVERY_OFF [RecoveryOff] = 3,
00068 RECOVERY_PARTIAL [RecoveryPartial],
00069 RECOVERY_FULL [RecoveryFull]
00070 };
00071
00072 enum tostring_flags [OqlCtbToStringFlags] {
00073 MTIME_TRACE [MTimeTrace] = 0x0001,
00074 CTIME_TRACE [CTimeTrace] = 0x0002,
00075 CMTIME_TRACE [CMTimeTrace] = 0x0003,
00076 POINTER_TRACE [PointerTrace] = 0x0004,
00077 COMPOID_TRACE [CompOidTrace] = 0x0008,
00078 NATIVE_TRACE [NativeTrace] = 0x0010,
00079 CONTENTS_TRACE [ContentsTrace] = 0x0020,
00080 INHATTR_TRACE [InhAttrTrace] = 0x0040,
00081 INHEXEC_TRACE [InhExecTrace] = 0x0080,
00082 EXECBODY_TRACE [ExecBodyTrace] = 0x0100,
00083 SYSEXEC_TRACE [SysExecTrace] = 0x0200,
00084 NOSCOPE_TRACE [NoScopeTrace] = 0x0400,
00085 FULLRECURS_TRACE [FullRecursTrace] = 0x1000
00086 };
00087
00088 native object {
00089
00090 instance_method<client, called_from=OQL> oid getOid();
00091 instance_method<client, called_from=OQL> object *getObject();
00092
00093 instance_method<client, called_from=OQL> string toString();
00094 instance_method<client, called_from=OQL> string toString(in int flags);
00095
00096 instance_method<client, called_from=OQL> database *getDatabase();
00097 instance_method<client, called_from=OQL> void setDatabase(in database *);
00098
00099 instance_method<client, called_from=OQL> dataspace *getDataspace();
00100
00101 instance_method<client, called_from=OQL> void setDataspace(in dataspace *);
00102 instance_method<client, called_from=OQL> void move(in dataspace *);
00103
00104 instance_method<client, called_from=OQL> void store();
00105
00106 instance_method<client, called_from=OQL> object *clone();
00107
00108 instance_method<client, called_from=OQL> int64 getCTime();
00109 instance_method<client, called_from=OQL> int64 getMTime();
00110
00111 instance_method<client, called_from=OQL> string getStringCTime();
00112 instance_method<client, called_from=OQL> string getStringMTime();
00113
00114 instance_method<client, called_from=OQL> bool isRemoved();
00115 instance_method<client, called_from=OQL> bool isModify();
00116
00117 instance_method<client, called_from=OQL> void setLock(in lock_mode mode);
00118 instance_method<client, called_from=OQL>
00119 void setLock(in lock_mode mode, out int rmode);
00120 instance_method<client, called_from=OQL> void getLock(out lock_mode rmode);
00121 };
00122
00123 native #class {
00124 instance_method<client, called_from=OQL> dataspace *getDefaultInstanceDataspace();
00125 instance_method<client, called_from=OQL> void setDefaultInstanceDataspace(in dataspace *);
00126 instance_method<client, called_from=OQL> void moveInstances(in dataspace *);
00127 };
00128
00129 enum MapType [OqlCtbMapType] {
00130 BITMAP_TYPE [BitmapType],
00131 LINKMAP_TYPE [LinkmapType]
00132 };
00133
00134 enum DatType [OqlCtbDatType] {
00135 LOGICAL_OID_TYPE [LogicalOidType] = 0x100,
00136 PHYSICAL_OID_TYPE [PhysicalOidType]
00137 };
00138
00139 class datafile [OqlCtbDatafile] {
00140
00141 short id;
00142 short dspid;
00143 dataspace *dsp;
00144 string file;
00145 string name;
00146 MapType mtype;
00147 int maxsize;
00148 int slotsize;
00149 DatType dtype;
00150
00151 %C++{
00152 Datafile *xdatfile;
00153 virtual void userInitialize();
00154 virtual void userCopy(const Object &);
00155 %}
00156 };
00157
00158 class dataspace [OqlCtbDataspace] {
00159 short id;
00160 string name;
00161 datafile *datafiles[];
00162
00163 %C++{
00164 Dataspace *xdataspace;
00165 virtual void userInitialize();
00166 virtual void userCopy(const Object &);
00167 %}
00168 };
00169
00170 native #index {
00171 instance_method<client, called_from=OQL> int getCount();
00172 instance_method<client, called_from=OQL> dataspace *getDefaultDataspace();
00173 instance_method<client, called_from=OQL> void setDefaultDataspace(in dataspace *);
00174 instance_method<client, called_from=OQL> void move(in dataspace *);
00175
00176 instance_method<client, called_from=OQL> string
00177 getImplementation(in bool local);
00178 instance_method<client, called_from=OQL> string getStats();
00179 instance_method<client, called_from=OQL> string getStats(in bool full);
00180
00181 instance_method<client, called_from=OQL>
00182 string simulate(in int idxtype, in string #hints, in bool full);
00183 instance_method<client, called_from=OQL>
00184 void reimplement(in string #hints);
00185 instance_method<client, called_from=OQL>
00186 oid reimplement(in int idxtype, in string #hints);
00187 };
00188
00189 native collection {
00190
00191 instance_method<client, called_from=OQL> int getCount();
00192 instance_method<client, called_from=OQL> string getName();
00193 instance_method<client, called_from=OQL> void setName(in string name);
00194 instance_method<client, called_from=OQL> bool isIn(in oid obj);
00195 instance_method<client, called_from=OQL> oid[] getElements(in oid obj);
00196
00197 instance_method<client, called_from=OQL> bool isLiteral();
00198 instance_method<client, called_from=OQL> bool isPureLiteral();
00199 instance_method<client, called_from=OQL> bool isLiteralObject();
00200
00201 instance_method<client, called_from=OQL> void setLiteralObject();
00202
00203 instance_method<client, called_from=OQL> oid getLiteralOid();
00204
00205 instance_method<client, called_from=OQL> dataspace *getDefaultDataspace();
00206 instance_method<client, called_from=OQL> void setDefaultDataspace(in dataspace *);
00207 instance_method<client, called_from=OQL> void moveElements(in dataspace *);
00208
00209 instance_method<client, called_from=OQL> string
00210 getImplementation(in bool local);
00211 instance_method<client, called_from=OQL> string getImplStats();
00212 instance_method<client, called_from=OQL> string getImplStats(in bool full);
00213
00214 instance_method<client, called_from=OQL>
00215 string simulate(in int idxtype, in string #hints, in bool full);
00216 instance_method<client, called_from=OQL>
00217 void reimplement(in int idxtype, in string #hints);
00218 };
00219
00220 native set {
00221
00222 instance_method<client, called_from=OQL> void addTo(in oid obj);
00223 instance_method<client, called_from=OQL> void suppress(in oid obj);
00224 };
00225
00226 native bag {
00227
00228 instance_method<client, called_from=OQL> void addTo(in oid obj);
00229 instance_method<client, called_from=OQL> void suppress(in oid obj);
00230 };
00231
00232 native array {
00233
00234 instance_method<client, called_from=OQL> void setInAt(in int pos, in oid obj);
00235 instance_method<client, called_from=OQL> void append(in oid obj);
00236 instance_method<client, called_from=OQL> void suppressAt(in int);
00237 instance_method<client, called_from=OQL> oid retrieveAt(in int);
00238 };
00239
00240 class eyedb [OqlCtbEyedb] {
00241
00242 class_method<client, called_from=OQL> string getConfigValue(in string name);
00243
00244 class_method<client, called_from=OQL> string getVersion();
00245 class_method<client, called_from=OQL> int getVersionNumber();
00246 class_method<client, called_from=OQL> string getCompilationTime();
00247
00248 class_method<client, called_from=OQL> string getArchitecture();
00249 };
00250
00251 class connection [OqlCtbConnection] {
00252
00253 instance_method<client, called_from=OQL> void open();
00254 instance_method<client, called_from=OQL>
00255 void open(in string host, in string port);
00256 instance_method<client, called_from=OQL> void close();
00257
00258 %C++{
00259 Connection *conn;
00260 virtual void userInitialize();
00261 virtual void userCopy(const Object &);
00262 %}
00263 };
00264
00265 class database [OqlCtbDatabase] {
00266 string dbname;
00267 int dbid;
00268 string dbmdb;
00269
00270 instance_method<client, called_from=OQL>
00271 void open(in connection *conn, in int mode);
00272
00273 instance_method<client, called_from=OQL>
00274 void open(in connection *conn, in int mode,
00275 in string userauth, in string passwdauth);
00276
00277 instance_method<client, called_from=OQL> void open(in int mode);
00278 instance_method<client, called_from=OQL>
00279 void open(in int mode,
00280 in string userauth, in string passwdauth);
00281
00282 instance_method<client, called_from=OQL> void close();
00283
00284 class_method<client, called_from=OQL> bool isAutoPersistMode();
00285 class_method<client, called_from=OQL> void setAutoPersistMode(in bool);
00286
00287 instance_method<client, called_from=OQL> bool isDefaultDatabase();
00288 instance_method<client, called_from=OQL> void setDefaultDatabase();
00289
00290 instance_method<client, called_from=OQL> void create();
00291 instance_method<client, called_from=OQL>
00292 void create(in string userauth, in string passwdauth);
00293
00294 instance_method<client, called_from=OQL> void destroy();
00295 instance_method<client, called_from=OQL>
00296 void destroy(in string userauth, in string passwdauth);
00297
00298 instance_method<client, called_from=OQL> void rename(in string newname);
00299 instance_method<client, called_from=OQL>
00300 void rename(in string newname,
00301 in string userauth, in string passwdauth);
00302
00303 instance_method<client, called_from=OQL> connection *getConnection();
00304 instance_method<client, called_from=OQL> int getOpenMode();
00305
00306 instance_method<client, called_from=OQL> bool getCommitOnClose();
00307 instance_method<client, called_from=OQL> void setCommitOnClose(in bool);
00308
00309 instance_method<client, called_from=OQL> int getVersionNumber();
00310 instance_method<client, called_from=OQL> string getVersion();
00311
00312 instance_method<client, called_from=OQL> void removeObject(in oid);
00313
00314 instance_method<client, called_from=OQL> void uncacheObject(in object *);
00315 instance_method<client, called_from=OQL> void uncacheObject(in oid);
00316
00317 instance_method<client, called_from=OQL> void transactionBegin();
00318 instance_method<client, called_from=OQL>
00319 void transactionBegin(in int trsmode, in int lockmode,
00320 in int recovmode, in int _magorder,
00321 in int ratioalrt, in int wait_timeout);
00322
00323 instance_method<client, called_from=OQL> void transactionCommit();
00324 instance_method<client, called_from=OQL> void transactionAbort();
00325
00326 instance_method<client, called_from=OQL> bool isInTransaction();
00327
00328 instance_method<client, called_from=OQL> datafile [] getDatafiles();
00329 instance_method<client, called_from=OQL> datafile *getDatafile(in string name);
00330 instance_method<client, called_from=OQL> datafile *getDatafile(in short id);
00331
00332 instance_method<client, called_from=OQL> dataspace [] getDataspaces();
00333 instance_method<client, called_from=OQL> dataspace *getDataspace(in string name);
00334 instance_method<client, called_from=OQL> dataspace *getDataspace(in short id);
00335
00336 instance_method<client, called_from=OQL> dataspace *getDefaultDataspace();
00337 instance_method<client, called_from=OQL> void setDefaultDataspace(in dataspace *);
00338
00339 instance_method<client, called_from=OQL> void moveObjects(in oid obj[],
00340 in dataspace *);
00341
00342 instance_method<client, called_from=OQL>
00343 void updateSchema(in string odlfile, in string package);
00344
00345 instance_method<client, called_from=OQL>
00346 void updateSchema(in string odlfile, in string package,
00347 in string schname, in string db_prefix);
00348
00349 instance_method<client, called_from=OQL>
00350 void updateSchema(in string odlfile, in string package,
00351 in string schname, in string db_prefix,
00352 in string cpp_cmd, in string cpp_flags);
00353
00354 instance_method<client, called_from=OQL>
00355 void setObjectLock(in oid _oid, in lock_mode mode);
00356 instance_method<client, called_from=OQL>
00357 void setObjectLock(in oid _oid, in lock_mode mode,
00358 out lock_mode rmode);
00359 instance_method<client, called_from=OQL>
00360 void getObjectLock(in oid _oid, out lock_mode rmode);
00361
00362 %C++{
00363 Database *xdb;
00364 virtual void userInitialize();
00365 virtual void userCopy(const Object &);
00366 %}
00367 };
00368
00369 class math [OqlCtbMath] {
00370
00371 class_method<client, called_from=OQL> double acos (in double);
00372 class_method<client, called_from=OQL> double asin (in double);
00373 class_method<client, called_from=OQL> double atan (in double);
00374 class_method<client, called_from=OQL> double atan2 (in double, in double);
00375 class_method<client, called_from=OQL> double cos (in double);
00376 class_method<client, called_from=OQL> double sin (in double);
00377 class_method<client, called_from=OQL> double tan (in double);
00378
00379 class_method<client, called_from=OQL> double cosh (in double);
00380 class_method<client, called_from=OQL> double sinh (in double);
00381 class_method<client, called_from=OQL> double tanh (in double);
00382
00383 class_method<client, called_from=OQL> double exp (in double);
00384 class_method<client, called_from=OQL> double log (in double);
00385 class_method<client, called_from=OQL> double log10 (in double);
00386
00387 class_method<client, called_from=OQL> double pow (in double, in double);
00388 class_method<client, called_from=OQL> double sqrt (in double);
00389
00390 class_method<client, called_from=OQL> double ceil (in double);
00391 class_method<client, called_from=OQL> double fabs (in double);
00392 class_method<client, called_from=OQL> double floor (in double);
00393 class_method<client, called_from=OQL> double fmod (in double, in double);
00394 class_method<client, called_from=OQL> double erf (in double);
00395 class_method<client, called_from=OQL> double erfc (in double);
00396 class_method<client, called_from=OQL> double gamma (in double);
00397 class_method<client, called_from=OQL> double hypot (in double, in double);
00398 class_method<client, called_from=OQL> int isnan (in double);
00399 class_method<client, called_from=OQL> double j0 (in double);
00400 class_method<client, called_from=OQL> double j1 (in double);
00401 class_method<client, called_from=OQL> double jn (in int, in double);
00402 class_method<client, called_from=OQL> double lgamma (in double);
00403 class_method<client, called_from=OQL> double y0 (in double);
00404 class_method<client, called_from=OQL> double y1 (in double);
00405 class_method<client, called_from=OQL> double yn (in int, in double);
00406
00407 class_method<client, called_from=OQL> double acosh (in double);
00408 class_method<client, called_from=OQL> double asinh (in double);
00409 class_method<client, called_from=OQL> double atanh (in double);
00410 class_method<client, called_from=OQL> double cbrt (in double);
00411 class_method<client, called_from=OQL> double logb (in double);
00412 class_method<client, called_from=OQL> double nextafter (in double, in double);
00413 class_method<client, called_from=OQL> double remainder (in double, in double);
00414 class_method<client, called_from=OQL> double scalb (in double, in double);
00415
00416 class_method<client, called_from=OQL> double expm1 (in double);
00417 class_method<client, called_from=OQL> int ilogb (in double);
00418 class_method<client, called_from=OQL> double log1p (in double);
00419 class_method<client, called_from=OQL> double rint (in double);
00420 };
00421
00422 class oql {
00423
00424
00425 #if 0
00426 instmethod<client, called_from=OQL> ostring ostring() %oql{
00427 return ostring::ostring();
00428 %}
00429
00430 instmethod<client, called_from=OQL> ostring ostring(in string s) %oql{
00431 return ostring::ostring(s);
00432 %}
00433
00434 instmethod<client, called_from=OQL> ostring ostring(in ostring s) %oql{
00435 return ostring::ostring(s);
00436 %}
00437 #endif
00438 };