oqlctbmthfe.cc

00001 /* 
00002    EyeDB Object Database Management System
00003    Copyright (C) 1994-2008 SYSRA
00004    
00005    EyeDB is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009    
00010    EyeDB is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014    
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with this library; if not, write to the Free Software
00017    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
00018 */
00019 
00020 /*
00021    Author: Eric Viara <viara@sysra.com>
00022 */
00023 
00024 #include <eyedbconfig.h>
00025 
00026 // WARNING: <iostream> must be NOT be included before this file on MacOS X
00027 #include <eyedblib/math.h>
00028 
00029 #include <math.h>
00030 #include <sstream>
00031 
00032 #include <eyedb/eyedb.h>
00033 #include <oql_p.h>
00034 #include <eyedb/oqlctb.h>
00035 #include "comp_time.h"
00036 
00037 using std::ostringstream;
00038 using namespace eyedb;
00039 
00040 #define CHKCONN(CONN, MSG) \
00041   OqlCtbConnection *CONN = (OqlCtbConnection *)_o; \
00042  \
00043   if (!(CONN)) \
00044     return Exception::make(MSG ": invalid null object"); \
00045  \
00046   if (!(CONN)->conn) \
00047     { \
00048       (CONN)->conn = new Connection(); \
00049       (CONN)->conn->setOQLInfo(CONN); \
00050     } 
00051 
00052 #define CHK2CONN(CONN, MSG) \
00053   OqlCtbConnection *CONN = (OqlCtbConnection *)_o; \
00054  \
00055   if (!(CONN)) \
00056     return Exception::make(MSG ": invalid null object"); \
00057  \
00058   if (!(CONN)->conn) \
00059     return Exception::make(MSG ": connection is not opened")
00060 
00061 #define CHKDB(DB, MSG) \
00062   OqlCtbDatabase *DB = (OqlCtbDatabase *)_o; \
00063  \
00064   if (!(DB)) \
00065     return Exception::make(MSG ": invalid null object"); \
00066  \
00067   if (!(DB)->xdb) \
00068     { \
00069       const char *dbname = (DB)->getDbname().c_str(); \
00070       int dbid = (DB)->getDbid(); \
00071       if ((!dbname || !*dbname) && !dbid) \
00072         return Exception::make(MSG ": database name or dbid must not set"); \
00073  \
00074       const char *dbmdb = (DB)->getDbmdb().c_str(); \
00075       if (!dbname || !*dbname) \
00076         (DB)->xdb = new Database(dbid, (*dbmdb ? dbmdb : 0)); \
00077       else \
00078         (DB)->xdb = new Database(dbname, (*dbmdb ? dbmdb : 0)); \
00079       (DB)->xdb->setOQLInfo(DB); \
00080     } 
00081 
00082 #define CHK2DB(DB, MSG) \
00083   OqlCtbDatabase *DB = (OqlCtbDatabase *)_o; \
00084  \
00085   if (!(DB)) \
00086     return Exception::make(MSG ": invalid null object"); \
00087  \
00088   if (!(DB)->xdb) \
00089     return Exception::make(MSG ": database is not opened")
00090 
00091 #define POSTDB(DB, S) \
00092   if (!S) { \
00093     (DB)->setDbname((DB)->xdb->getName()); \
00094     (DB)->setDbid((DB)->xdb->getDbid()); \
00095     (DB)->setDbmdb((DB)->xdb->getDBMDB()); \
00096   }
00097 
00098   static void
00099   not_impl(const char *msg)
00100   {
00101     fprintf(stderr, "oqlctbmthfe.cc: %s not implemented\n", msg);
00102   }
00103 
00104   //
00105   // string eyedb_::getConfigValue(in string) [oqlctbmthfe.cc]
00106   //
00107 
00108   Status
00109   __method_static_OUT_string_getConfigValue_eyedb__IN_string(Database *_db, FEMethod_C *_m, const char * name, char * &retarg)
00110   {
00111     const char *x = eyedb::ClientConfig::getCValue(name);
00112     retarg = Argument::dup(x ? x : "");
00113     return Success;
00114   }
00115 
00116   //
00117   // string eyedb_::getVersion() [oqlctbmthfe.cc]
00118   //
00119 
00120   Status
00121   __method_static_OUT_string_getVersion_eyedb(Database *_db, FEMethod_C *_m, char * &retarg)
00122   {
00123     retarg = Argument::dup(eyedb::getVersion());
00124     return Success;
00125   }
00126 
00127   //
00128   // int32 eyedb_::getVersionNumber() [oqlctbmthfe.cc]
00129   //
00130 
00131   Status
00132   __method_static_OUT_int32_getVersionNumber_eyedb(Database *_db, FEMethod_C *_m, eyedblib::int32 &retarg)
00133   {
00134     retarg = eyedb::getVersionNumber();
00135     return Success;
00136   }
00137 
00138   //
00139   // string eyedb_::getArchitecture() [oqlctbmthfe.cc]
00140   //
00141 
00142   Status
00143   __method_static_OUT_string_getArchitecture_eyedb(Database *_db, FEMethod_C *_m, char * &retarg)
00144   {
00145     retarg = Argument::dup(Architecture::getArchitecture()->getArch());
00146     return Success;
00147   }
00148 
00149   //
00150   // string eyedb_::getCompilationTime() [oqlctbmthfe.cc]
00151   //
00152 
00153   Status
00154   __method_static_OUT_string_getCompilationTime_eyedb(Database *_db, FEMethod_C *_m, char * &retarg)
00155   {
00156     retarg = Argument::dup(getCompilationTime());
00157     return Success;
00158   }
00159 
00160   //
00161   // oid object::getOid() [oqlctbfe.cc]
00162   //
00163 
00164   Status
00165   __method__OUT_oid_getOid_object(Database *_db, FEMethod_C *_m, Object *_o, Oid &retarg)
00166   {
00167 
00168     retarg = _o->getOid();
00169     return Success;
00170   }
00171 
00172   //
00173   // object *object::getObject() [oqlctbfe.cc]
00174   //
00175 
00176   Status
00177   __method__OUT_object_REF__getObject_object(eyedb::Database *_db, eyedb::FEMethod_C *_m, eyedb::Object *_o, eyedb::Object * &retarg)
00178    {
00179       retarg = _o;
00180       _o->incrRefCount();
00181       return Success;
00182   }
00183 
00184   static OqlCtbDatafile *
00185   makeDatafile(Database *db, const Datafile *dat)
00186   {
00187     if (!dat)
00188       return 0;
00189 
00190     OqlCtbDatafile *rdat = new OqlCtbDatafile(db);
00191       
00192     rdat->xdatfile = const_cast<Datafile*>(dat);
00193     rdat->setId(dat->getId());
00194     rdat->setDspid(dat->getDspid());
00195     rdat->setFile(dat->getFile());
00196     rdat->setName(dat->getName());
00197     rdat->setMtype(dat->getMaptype() ==
00198                    eyedbsm::BitmapType ?
00199                    OqlCtbMapType::BitmapType :
00200                    OqlCtbMapType::LinkmapType);
00201     rdat->setMaxsize(dat->getMaxsize());
00202     rdat->setSlotsize(dat->getSlotsize());
00203     rdat->setDtype(dat->isPhysical() ?
00204                    OqlCtbDatType::PhysicalOidType :
00205                    OqlCtbDatType::LogicalOidType);
00206 
00207     return rdat;
00208   }
00209 
00210   static OqlCtbDataspace *
00211   makeDataspace(Database *db, const Dataspace *dsp)
00212   {
00213     if (!dsp)
00214       return 0;
00215 
00216     OqlCtbDataspace *rdsp = new OqlCtbDataspace(db);
00217 
00218     rdsp->xdataspace = const_cast<Dataspace*>(dsp);
00219     rdsp->setId(dsp->getId());
00220     rdsp->setName(dsp->getName());
00221 
00222     unsigned int datafile_cnt;
00223     const Datafile **datafiles = dsp->getDatafiles(datafile_cnt);
00224     OqlCtbDatafile **rdatafiles = new OqlCtbDatafile*[datafile_cnt];
00225     for (int n = 0; n < datafile_cnt; n++) {
00226       OqlCtbDatafile *rdat = makeDatafile(db, datafiles[n]);
00227       rdat->setDsp(rdsp);
00228       rdsp->setDatafiles(n, rdat);
00229     }
00230 
00231     return rdsp;
00232   }
00233 
00234   //
00235   // int16 object::getDataspaceID() [oqlctbmthfe.cc]
00236   //
00237 
00238   Status
00239   __method__OUT_int16_getDataspaceID_object(Database *_db, FEMethod_C *_m, Object *_o, eyedblib::int16 &dspid)
00240   {
00241     dspid = _o->getDataspaceID();
00242     return Success;
00243   }
00244 
00245   //
00246   // dataspace* object::getDataspace() [oqlctbmthfe.cc]
00247   //
00248 
00249   Status
00250   __method__OUT_dataspace_REF__getDataspace_object(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * &rdataspace)
00251   {
00252     const Dataspace *dataspace;
00253     Status s = _o->getDataspace(dataspace);
00254     if (s)
00255       return s;
00256 
00257     rdataspace = makeDataspace(_db, dataspace);
00258     return Success;
00259   }
00260 
00261   //
00262   // void object::setDataspace(in dataspace*) [oqlctbmthfe.cc]
00263   //
00264 
00265   Status
00266   __method__OUT_void_setDataspace_object__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
00267   {
00268     return _o->setDataspace(dsp->xdataspace);
00269   }
00270 
00271   //
00272   // void object::move(in dataspace*) [oqlctbmthfe.cc]
00273   //
00274 
00275   Status
00276   __method__OUT_void_move_object__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
00277   {
00278     return _o->move(dsp->xdataspace);
00279   }
00280 
00281   //
00282   // void object::store() [oqlctbfe.cc]
00283   //
00284 
00285   Status
00286   __method__OUT_void_store_object(Database *_db, FEMethod_C *_m, Object *_o)
00287   {
00288     return _o->store();
00289   }
00290 
00291   //
00292   // void object::setDatabase(in database*) [oqlctbfe.cc]
00293   //
00294 
00295   Status
00296   __method__OUT_void_setDatabase_object__IN_database_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDatabase * db)
00297   {
00298     if (!db->xdb)
00299       return Exception::make("object::setDatabase(in database *): "
00300                              "database is not opened");
00301 
00302     return _o->setDatabase(db->xdb);
00303   }
00304 
00305   //
00306   // string object::toString() [oqlctbfe.cc]
00307   //
00308 
00309 // disconnected 20/10/05
00310 //#define AUTO_GARB
00311 
00312   static Status
00313   toStringRealize(Database *_db, Object *_o, int flags, char * &retarg)
00314   {
00315     Object *o = _o;
00316 #ifdef AUTO_GARB
00317     gbxAutoGarb _;
00318 #endif
00319 
00320     if ((flags & OqlCtbToStringFlags::FullRecursTrace) &&
00321         o->getOid().isValid()) {
00322       Status s = _db->reloadObject(o->getOid(), o, RecMode::FullRecurs);
00323       if (s) return s;
00324     }
00325   
00326     Status status;
00327     std::string str = o->toString(flags, (flags & OqlCtbToStringFlags::FullRecursTrace ? RecMode::FullRecurs : RecMode::NoRecurs), &status);
00328     retarg = Argument::dup(str.c_str());
00329 
00330 #ifndef AUTO_GARB
00331     if (o != _o) {
00332       //printf("NOT releasing %p [refcnt=%d] %p [refcnt=%d]\n", o, o->getRefCount(),
00333       //_o, _o->getRefCount());
00334       o->release();
00335     }
00336 #endif
00337 
00338     return status;
00339   }
00340 
00341   Status
00342   __method__OUT_string_toString_object(Database *_db, FEMethod_C *_m, Object *_o, char * &retarg)
00343   {
00344     return toStringRealize(_db, _o, 0, retarg);
00345   }
00346 
00347   //
00348   // string object::toString(in int flags) [oqlctbfe.cc]
00349   //
00350 
00351   Status
00352   __method__OUT_string_toString_object__IN_int32(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 flags, char * &retarg)
00353   {
00354     return toStringRealize(_db, _o, flags, retarg);
00355   }
00356 
00357   //
00358   // database* object::getDatabase() [oqlctbfe.cc]
00359   //
00360 
00361   Status
00362   __method__OUT_database_REF__getDatabase_object(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDatabase * &retarg)
00363   {
00364     retarg = (OqlCtbDatabase *)(_o->getDatabase()->getOQLInfo());
00365 
00366     if (retarg)
00367       {
00368         Database *db = retarg->xdb;
00369         retarg = new OqlCtbDatabase(*retarg);
00370         retarg->xdb = db;
00371       }
00372     else
00373       {
00374         const Class *clsdb = _db->getSchema()->getClass("database");
00375         if (clsdb)
00376           {
00377             Database *xdb = _o->getDatabase();
00378             retarg = new OqlCtbDatabase(xdb);
00379             retarg->setDbname(xdb->getName());
00380             retarg->setDbid(xdb->getDbid());
00381             retarg->setDbmdb(xdb->getDBMDB());
00382             retarg->xdb = xdb;
00383             xdb->setOQLInfo(retarg);
00384           }
00385       }
00386 
00387 
00388     return Success;
00389   }
00390 
00391   //
00392   // object* object::clone() [oqlctbmthfe.cc]
00393   //
00394 
00395   Status
00396   __method__OUT_object_REF__clone_object(Database *_db, FEMethod_C *_m, Object *_o, Object * &retarg)
00397   {
00398     retarg = _o->clone();
00399     return Success;
00400   }
00401 
00402   //
00403   // int64 object::getCTime() [oqlctbfe.cc]
00404   //
00405 
00406   Status
00407   __method__OUT_int64_getCTime_object(Database *_db, FEMethod_C *_m, Object *_o, eyedblib::int64 &retarg)
00408   {
00409     retarg = _o->getCTime();
00410     return Success;
00411   }
00412 
00413   //
00414   // int64 object::getMTime() [oqlctbfe.cc]
00415   //
00416 
00417   Status
00418   __method__OUT_int64_getMTime_object(Database *_db, FEMethod_C *_m, Object *_o, eyedblib::int64 &retarg)
00419   {
00420     retarg = _o->getMTime();
00421     return Success;
00422   }
00423 
00424   //
00425   // string object::getStringCTime() [oqlctbfe.cc]
00426   //
00427 
00428   Status
00429   __method__OUT_string_getStringCTime_object(Database *_db, FEMethod_C *_m, Object *_o, char * &retarg)
00430   {
00431     retarg = Argument::dup(_o->getStringCTime());
00432     return Success;
00433   }
00434 
00435   //
00436   // string object::getStringMTime() [oqlctbfe.cc]
00437   //
00438 
00439   Status
00440   __method__OUT_string_getStringMTime_object(Database *_db, FEMethod_C *_m, Object *_o, char * &retarg)
00441   {
00442     retarg = Argument::dup(_o->getStringMTime());
00443     return Success;
00444   }
00445 
00446   //
00447   // Bool object::isRemoved() [oqlctbfe.cc]
00448   //
00449 
00450   Status
00451   __method__OUT_bool_isRemoved_object(Database *_db, FEMethod_C *_m, Object *_o, Bool &retarg)
00452   {
00453     retarg = (Bool)_o->isRemoved();
00454     return Success;
00455   }
00456 
00457   //
00458   // int32 object::isModify() [oqlctbfe.cc]
00459   //
00460 
00461   Status
00462   __method__OUT_bool_isModify_object(Database *_db, FEMethod_C *_m, Object *_o, Bool &retarg)
00463   {
00464     retarg = (Bool)_o->isModify();
00465     return Success;
00466   }
00467 
00468   //
00469   // void object::setLock(in lock_mode) [oqlctbmthfe.cc]
00470   //
00471 
00472   Status
00473   __method__OUT_void_setLock_object__IN_lock_mode(Database *_db, FEMethod_C *_m, Object *_o, const OqlCtbLockMode::Type mode)
00474   {
00475     return _o->setLock((LockMode)mode);
00476   }
00477 
00478   //
00479   // void object::setLock(in lock_mode, out int32) [oqlctbmthfe.cc]
00480   //
00481 
00482   Status
00483   __method__OUT_void_setLock_object__IN_lock_mode__OUT_int32(Database *_db, FEMethod_C *_m, Object *_o, const OqlCtbLockMode::Type mode, eyedblib::int32 &rmode)
00484   {
00485     LockMode _rmode;
00486     Status s = _o->setLock((LockMode)mode, _rmode);
00487     rmode = _rmode;
00488     return s;
00489   }
00490 
00491   //
00492   // void object::getLock(out lock_mode) [oqlctbmthfe.cc]
00493   //
00494 
00495   Status
00496   __method__OUT_void_getLock_object__OUT_lock_mode(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbLockMode::Type &rmode)
00497   {
00498     LockMode _rmode;
00499     Status s = _o->getLock(_rmode);
00500     rmode = (OqlCtbLockMode::Type)_rmode;
00501     return s;
00502   }
00503 
00504   //
00505   // void Connection_::open() [oqlctbfe.cc]
00506   //
00507 
00508   Status
00509   __method__OUT_void_open_connection(Database *_db, FEMethod_C *_m, Object *_o)
00510   {
00511     CHKCONN(conn, "connection::open()");
00512     return conn->conn->open();
00513   }
00514 
00515   //
00516   // void Connection_::open(in string, in string) [oqlctbfe.cc]
00517   //
00518 
00519   Status
00520   __method__OUT_void_open_connection__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * host, const char * port)
00521   {
00522     CHKCONN(conn, "connection::open(in string host, in string port)");
00523     return conn->conn->open(host, port);
00524   }
00525 
00526   //
00527   // void Connection_::close() [oqlctbfe.cc]
00528   //
00529 
00530   Status
00531   __method__OUT_void_close_connection(Database *_db, FEMethod_C *_m, Object *_o)
00532   {
00533     CHK2CONN(conn, "connection::close()");
00534     return conn->conn->close();
00535   }
00536 
00537   //
00538   // void Database_::open(in connection*, in int32) [oqlctbfe.cc]
00539   //
00540 
00541   Status
00542   __method__OUT_void_open_database__IN_connection_REF___IN_int32(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbConnection * conn, const eyedblib::int32 mode)
00543   {
00544     CHKDB(db, "database::open(in connection conn, in int mode)");
00545     Status s = db->xdb->open(((OqlCtbConnection *)conn)->conn,
00546                              (Database::OpenFlag)(mode|_DBOpenLocal));
00547     POSTDB(db, s);
00548     return s;
00549   }
00550 
00551   //
00552   // void Database_::open(in connection*, in int32, in string, in string) [oqlctbfe.cc]
00553   //
00554 
00555   Status
00556   __method__OUT_void_open_database__IN_connection_REF___IN_int32__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbConnection * conn, const eyedblib::int32 mode, const char * userauth, const char * passwdauth)
00557   {
00558     CHKDB(db, "database::open(in connection *, in int mode, in string user, in string passwd)");
00559     Status s = db->xdb->open(((OqlCtbConnection *)conn)->conn,
00560                              (Database::OpenFlag)(mode|_DBOpenLocal), userauth, passwdauth);
00561     POSTDB(db, s);
00562     return s;
00563   }
00564 
00565   //
00566   // void Database_::open(in int32) [oqlctbfe.cc]
00567   //
00568 
00569   Status
00570   __method__OUT_void_open_database__IN_int32(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 mode)
00571   {
00572     CHKDB(db, "database::open(in int mode)");
00573     Status s = db->xdb->open(_db->getConnection(), (Database::OpenFlag)(mode|_DBOpenLocal));
00574 
00575     POSTDB(db, s);
00576     return s;
00577   }
00578 
00579   //
00580   // void Database_::open(in int32, in string, in string) [oqlctbfe.cc]
00581   //
00582 
00583   Status
00584   __method__OUT_void_open_database__IN_int32__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 mode, const char * userauth, const char * passwdauth)
00585   {
00586     CHKDB(db, "database::open(in int mode, in string user, in string passwd)");
00587     Status s = db->xdb->open(_db->getConnection(), (Database::OpenFlag)(mode|_DBOpenLocal),
00588                              userauth, passwdauth);
00589     POSTDB(db, s);
00590     return s;
00591   }
00592 
00593   //
00594   // void Database_::close() [oqlctbfe.cc]
00595   //
00596 
00597   Status
00598   __method__OUT_void_close_database(Database *_db, FEMethod_C *_m, Object *_o)
00599   {
00600     CHK2DB(db, "database::close()");
00601     return db->xdb->close();
00602   }
00603 
00604   //
00605   // void Database_::create() [oqlctbmthfe.cc]
00606   //
00607 
00608   Status
00609   __method__OUT_void_create_database(Database *_db, FEMethod_C *_m, Object *_o)
00610   {
00611     CHKDB(db, "database::create()");
00612     return db->xdb->create(_db->getConnection());
00613   }
00614 
00615   //
00616   // void Database_::create(in string, in string) [oqlctbmthfe.cc]
00617   //
00618 
00619   Status
00620   __method__OUT_void_create_database__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * userauth, const char * passwdauth)
00621   {
00622     CHKDB(db, "database::create(userauth, passwduth)");
00623     return db->xdb->create(_db->getConnection(), userauth, passwdauth);
00624   }
00625 
00626   //
00627   // void Database_::destroy() [oqlctbmthfe.cc]
00628   //
00629 
00630   Status
00631   __method__OUT_void_destroy_database(Database *_db, FEMethod_C *_m, Object *_o)
00632   {
00633     CHKDB(db, "database::destroy()");
00634     Status s =  db->xdb->remove(_db->getConnection());
00635     return s;
00636   }
00637 
00638   //
00639   // void Database_::destroy(in string, in string) [oqlctbmthfe.cc]
00640   //
00641 
00642   Status
00643   __method__OUT_void_destroy_database__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * userauth, const char * passwdauth)
00644   {
00645     CHKDB(db, "database::destroy(userauth, passwdauth)");
00646     return db->xdb->remove(_db->getConnection(), userauth, passwdauth);
00647   }
00648 
00649   //
00650   // void Database_::rename(in string) [oqlctbmthfe.cc]
00651   //
00652 
00653   Status
00654   __method__OUT_void_rename_database__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * newname)
00655   {
00656     CHKDB(db, "database::rename(newname)");
00657     return db->xdb->rename(_db->getConnection(), newname);
00658   }
00659 
00660   //
00661   // void Database_::rename(in string, in string, in string) [oqlctbmthfe.cc]
00662   //
00663 
00664   Status
00665   __method__OUT_void_rename_database__IN_string__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * newname, const char * userauth, const char * passwdauth)
00666   {
00667     CHKDB(db, "database::rename(newname, userauth, passwdauth)");
00668     return db->xdb->rename(_db->getConnection(), newname, userauth, passwdauth);
00669   }
00670 
00671   //
00672   // int32 Database_::isAutoPersistMode() [oqlctbfe.cc]
00673   //
00674 
00675   Status
00676   __method_static_OUT_bool_isAutoPersistMode_database(Database *_db, FEMethod_C *_m, Bool &retarg)
00677   {
00678     retarg = (Bool)oqml_auto_persist;
00679     return Success;
00680   }
00681 
00682   //
00683   // void Database_::setAutoPersistMode(in int32) [oqlctbfe.cc]
00684   //
00685 
00686   Status
00687   __method_static_OUT_void_setAutoPersistMode_database__IN_bool(Database *_db, FEMethod_C *_m, const Bool arg1)
00688   {
00689     oqml_auto_persist = OQMLBOOL(arg1);
00690     return Success;
00691   }
00692 
00693   //
00694   // bool Database_::isDefaultDatabase() [oqlctbfe.cc]
00695   //
00696 
00697   Status
00698   __method__OUT_bool_isDefaultDatabase_database(Database *_db, FEMethod_C *_m, Object *_o, Bool &retarg)
00699   {
00700     CHK2DB(db, "database::isDefaultDatabase()");
00701     retarg = (oqml_default_db == db ? True : False);
00702     return Success;
00703   }
00704 
00705   //
00706   // void Database_::setDefaultDatabase(in database*) [oqlctbfe.cc]
00707   //
00708 
00709   Status
00710   __method__OUT_void_setDefaultDatabase_database(Database *_db, FEMethod_C *_m, Object *_o)
00711   {
00712     CHK2DB(db, "database::setDefaultDatabase()");
00713     oqml_default_db = db;
00714     return Success;
00715   }
00716 
00717   //
00718   // connection* Database_::getConnection() [oqlctbfe.cc]
00719   //
00720 
00721   Status
00722   __method__OUT_connection_REF__getConnection_database(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbConnection * &retarg)
00723   {
00724     retarg = (OqlCtbConnection *)(_o->getDatabase()->getConnection()->getOQLInfo());
00725     if (!retarg)
00726       {
00727         Connection *conn  =_o->getDatabase()->getConnection();
00728         retarg = new OqlCtbConnection();
00729         retarg->conn = conn;
00730         conn->setOQLInfo(retarg);
00731       }
00732 
00733     return Success;
00734   }
00735 
00736   //
00737   // int32 Database_::getOpenMode() [oqlctbfe.cc]
00738   //
00739 
00740   Status
00741   __method__OUT_int32_getOpenMode_database(Database *_db, FEMethod_C *_m, Object *_o, eyedblib::int32 &retarg)
00742   {
00743     CHK2DB(db, "database::getOpenMode()");
00744     retarg = db->xdb->getOpenFlag();
00745     return Success;
00746   }
00747 
00748   //
00749   // int32 Database_::getCommitOnClose() [oqlctbfe.cc]
00750   //
00751 
00752   Status
00753   __method__OUT_bool_getCommitOnClose_database(Database *_db, FEMethod_C *_m, Object *_o, Bool &retarg)
00754   {
00755     CHK2DB(db, "database::getCommitOnClose()");
00756     retarg = (Bool)db->xdb->getCommitOnClose();
00757     return Success;
00758   }
00759 
00760   //
00761   // void Database_::setCommitOnClose(in int32) [oqlctbfe.cc]
00762   //
00763 
00764   Status
00765   __method__OUT_void_setCommitOnClose_database__IN_bool(Database *_db, FEMethod_C *_m, Object *_o, const Bool arg1)
00766   {
00767     CHK2DB(db, "database::setCommitOnClose(in int)");
00768     db->xdb->setCommitOnClose((Bool)arg1);
00769     return Success;
00770   }
00771 
00772   //
00773   // int32 Database_::getVersionNumber() [oqlctbfe.cc]
00774   //
00775 
00776   Status
00777   __method__OUT_int32_getVersionNumber_database(Database *_db, FEMethod_C *_m, Object *_o, eyedblib::int32 &retarg)
00778   {
00779     CHK2DB(db, "database::getVersionNumber()");
00780     retarg = db->xdb->getVersionNumber();
00781     return Success;
00782   }
00783 
00784   //
00785   // string Database_::getVersion() [oqlctbfe.cc]
00786   //
00787 
00788   Status
00789   __method__OUT_string_getVersion_database(Database *_db, FEMethod_C *_m, Object *_o, char * &retarg)
00790   {
00791     CHK2DB(db, "database::getVersion()");
00792     retarg = Argument::dup(db->xdb->getVersion());
00793     return Success;
00794   }
00795 
00796   //
00797   // void Database_::removeObject(in oid) [oqlctbfe.cc]
00798   //
00799 
00800   Status
00801   __method__OUT_void_removeObject_database__IN_oid(Database *_db, FEMethod_C *_m, Object *_o, const Oid arg1)
00802   {
00803     CHK2DB(db, "database::removeObject(in oid)");
00804     return db->xdb->removeObject(arg1);
00805   }
00806 
00807   //
00808   // void Database_::uncacheObject(in object*) [oqlctbfe.cc]
00809   //
00810 
00811   Status
00812   __method__OUT_void_uncacheObject_database__IN_object_REF_(Database *_db, FEMethod_C *_m, Object *_o, Object * arg1)
00813   {
00814     CHK2DB(db, "database::uncacheObject(in object *)");
00815     db->xdb->uncacheObject(arg1);
00816     return Success;
00817   }
00818 
00819   //
00820   // void Database_::uncacheObject(in oid) [oqlctbfe.cc]
00821   //
00822 
00823   Status
00824   __method__OUT_void_uncacheObject_database__IN_oid(Database *_db, FEMethod_C *_m, Object *_o, const Oid arg1)
00825   {
00826     CHK2DB(db, "database::uncacheObject(in oid)");
00827     db->xdb->uncacheObject(arg1);
00828     return Success;
00829   }
00830 
00831   //
00832   // void Database_::transactionBegin(in int32, in int32, in int32, in int32, in int32, in int32) [oqlctbmthfe.cc]
00833   //
00834 
00835   Status
00836   __method__OUT_void_transactionBegin_database__IN_int32__IN_int32__IN_int32__IN_int32__IN_int32__IN_int32(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 trsmode, const eyedblib::int32 lockmode, const eyedblib::int32 recovmode, const eyedblib::int32 _magorder, const eyedblib::int32 ratioalrt, const eyedblib::int32 wait_timeout)
00837   {
00838     CHK2DB(db, "database::transactionBegin()");
00839 
00840     TransactionParams params;
00841     params.trsmode = (TransactionMode)trsmode;
00842     params.lockmode = (TransactionLockMode)lockmode;
00843     params.recovmode = (RecoveryMode)recovmode;
00844     params.magorder = _magorder;
00845     params.ratioalrt = ratioalrt;
00846     params.wait_timeout = wait_timeout;
00847 
00848     return db->xdb->transactionBegin(params);
00849   }
00850 
00851   //
00852   // void Database_::transactionBegin() [oqlctbmthfe.cc]
00853   //
00854 
00855   Status
00856   __method__OUT_void_transactionBegin_database(Database *_db, FEMethod_C *_m, Object *_o)
00857   {
00858     CHK2DB(db, "database::transactionBegin()");
00859     return db->xdb->transactionBegin();
00860   }
00861 
00862   //
00863   // void Database_::transactionCommit() [oqlctbfe.cc]
00864   //
00865 
00866   Status
00867   __method__OUT_void_transactionCommit_database(Database *_db, FEMethod_C *_m, Object *_o)
00868   {
00869     CHK2DB(db, "database::transactionCommit()");
00870     return db->xdb->transactionCommit();
00871   }
00872 
00873   //
00874   // void Database_::transactionAbort() [oqlctbfe.cc]
00875   //
00876 
00877   Status
00878   __method__OUT_void_transactionAbort_database(Database *_db, FEMethod_C *_m, Object *_o)
00879   {
00880     CHK2DB(db, "database::transactionAbort()");
00881     return db->xdb->transactionAbort();
00882   }
00883   //
00884   // Bool Database_::isInTransaction() [oqlctbmthfe.cc]
00885   //
00886 
00887   Status
00888   __method__OUT_bool_isInTransaction_database(Database *_db, FEMethod_C *_m, Object *_o, Bool &retarg)
00889   {
00890     CHK2DB(db, "database::isInTransaction()");
00891     retarg = (Bool)db->xdb->isInTransaction();
00892     return Success;
00893   }
00894 
00895   //
00896   // datafile*[] Database_::getDatafiles() [oqlctbmthfe.cc]
00897   //
00898 
00899   Status
00900   __method__OUT_datafile_REF__ARRAY__getDatafiles_database(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDatafile * * &rdatafiles, int &rdatafile_cnt)
00901   {
00902     CHK2DB(db, "database::getDatafiles()");
00903 
00904     const Datafile **datafiles;
00905     unsigned int cnt;
00906     Status s = db->xdb->getDatafiles(datafiles, cnt);
00907     if (s)
00908       return s;
00909 
00910     rdatafile_cnt = cnt;
00911     rdatafiles = new OqlCtbDatafile*[rdatafile_cnt];
00912     for (int n = 0; n < rdatafile_cnt; n++)
00913       rdatafiles[n] = makeDatafile(db->xdb, datafiles[n]);
00914 
00915     return Success;
00916   }
00917 
00918   //
00919   // datafile* Database_::getDatafile(in string) [oqlctbmthfe.cc]
00920   //
00921 
00922   Status
00923   __method__OUT_datafile_REF__getDatafile_database__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * name, OqlCtbDatafile * &rdatafile)
00924   {
00925     CHK2DB(db, "database::getDatafile(in string)");
00926 
00927     const Datafile *datafile;
00928     Status s = db->xdb->getDatafile(name, datafile);
00929     if (s)
00930       return s;
00931 
00932     rdatafile = makeDatafile(db->xdb, datafile);
00933 
00934     return Success;
00935   }
00936 
00937   //
00938   // datafile* Database_::getDatafile(in int16) [oqlctbmthfe.cc]
00939   //
00940 
00941   Status
00942   __method__OUT_datafile_REF__getDatafile_database__IN_int16(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int16 id, OqlCtbDatafile * &rdatafile)
00943   {
00944     CHK2DB(db, "database::getDatafile(in int16)");
00945 
00946     const Datafile *datafile;
00947     Status s = db->xdb->getDatafile(id, datafile);
00948     if (s)
00949       return s;
00950 
00951     rdatafile = makeDatafile(db->xdb, datafile);
00952 
00953     return Success;
00954   }
00955 
00956   //
00957   // dataspace*[] Database_::getDataspaces() [oqlctbmthfe.cc]
00958   //
00959 
00960   Status
00961   __method__OUT_dataspace_REF__ARRAY__getDataspaces_database(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * * &rdataspaces, int &rdataspaces_cnt)
00962   {
00963 
00964     CHK2DB(db, "dataspace*[] database::getDataspaces()");
00965     const Dataspace **dataspaces;
00966     unsigned int cnt;
00967     Status s = db->xdb->getDataspaces(dataspaces, cnt);
00968     if (s)
00969       return s;
00970 
00971     rdataspaces_cnt = cnt;
00972     rdataspaces = new OqlCtbDataspace*[cnt];
00973 
00974     for (int n = 0; n < cnt; n++)
00975       rdataspaces[n] = makeDataspace(db->xdb, dataspaces[n]);
00976 
00977     return Success;
00978   }
00979 
00980   //
00981   // dataspace* Database_::getDataspace(in string) [oqlctbmthfe.cc]
00982   //
00983 
00984   Status
00985   __method__OUT_dataspace_REF__getDataspace_database__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * name, OqlCtbDataspace * &rdsp)
00986   {
00987     CHK2DB(db, "dataspace* database::getDataspace(in string)");
00988     const Dataspace *dataspace;
00989     Status s = db->xdb->getDataspace(name, dataspace);
00990     if (s || !dataspace)
00991       return s;
00992     rdsp = makeDataspace(db->xdb, dataspace);
00993     return Success;
00994   }
00995 
00996   //
00997   // dataspace* Database_::getDataspace(in int16) [oqlctbmthfe.cc]
00998   //
00999 
01000   Status
01001   __method__OUT_dataspace_REF__getDataspace_database__IN_int16(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int16 id, OqlCtbDataspace * &rdsp)
01002   {
01003     CHK2DB(db, "dataspace* database::getDataspace(in int16)");
01004     const Dataspace *dataspace;
01005     Status s = db->xdb->getDataspace(id, dataspace);
01006     if (s || !dataspace)
01007       return s;
01008     rdsp = makeDataspace(db->xdb, dataspace);
01009     return Success;
01010   }
01011 
01012   //
01013   // dataspace* Database_::getDefaultDataspace() [oqlctbmthfe.cc]
01014   //
01015 
01016   Status
01017   __method__OUT_dataspace_REF__getDefaultDataspace_database(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * &rdataspace)
01018   {
01019     CHK2DB(db, "dataspace* database::getDefaultDataspace()");
01020     const Dataspace *dataspace;
01021     Status s = db->xdb->getDefaultDataspace(dataspace);
01022     if (s)
01023       return s;
01024 
01025     rdataspace = makeDataspace(db->xdb, dataspace);
01026     return Success;
01027   }
01028 
01029   //
01030   // void Database_::setDefaultDataspace(in dataspace*) [oqlctbmthfe.cc]
01031   //
01032 
01033   Status
01034   __method__OUT_void_setDefaultDataspace_database__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dataspace)
01035   {
01036     CHK2DB(db, "void database::setDefaultDataspace(in dataspace *)");
01037     return db->xdb->setDefaultDataspace(dataspace->xdataspace);
01038   }
01039 
01040   //
01041   // void Database_::moveObjects(in oid[], in dataspace*) [oqlctbmthfe.cc]
01042   //
01043 
01044   Status
01045   __method__OUT_void_moveObjects_database__IN_oid_ARRAY___IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, const Oid *oids, int oid_cnt, OqlCtbDataspace * dsp)
01046   {
01047     OidArray oid_arr(oids, oid_cnt);
01048 
01049     return _db->moveObjects(oid_arr, dsp->xdataspace);
01050   }
01051 
01052   //
01053   // void Database_::setObjectLock(in oid, in lock_mode) [oqlctbmthfe.cc]
01054   //
01055 
01056   Status
01057   __method__OUT_void_setObjectLock_database__IN_oid__IN_lock_mode(Database *_db, FEMethod_C *_m, Object *_o, const Oid _oid, const OqlCtbLockMode::Type mode)
01058   {
01059     CHK2DB(db, "database::setObjectLock(oid, mode)");
01060     return db->xdb->setObjectLock(_oid, (LockMode)mode);
01061   }
01062 
01063   //
01064   // void Database_::setObjectLock(in oid, in lock_mode, out lock_mode) [oqlctbmthfe.cc]
01065   //
01066 
01067   Status
01068   __method__OUT_void_setObjectLock_database__IN_oid__IN_lock_mode__OUT_lock_mode(Database *_db, FEMethod_C *_m, Object *_o, const Oid _oid, const OqlCtbLockMode::Type mode, OqlCtbLockMode::Type &rmode)
01069   {
01070     CHK2DB(db, "database::setObjectLock(oid, mode, rmode)");
01071     LockMode _rmode;
01072     Status s = db->xdb->setObjectLock(_oid, (LockMode)mode, _rmode);
01073     rmode = (OqlCtbLockMode::Type)_rmode;
01074     return s;
01075   }
01076 
01077   //
01078   // void Database_::getObjectLock(in oid, out lock_mode) [oqlctbmthfe.cc]
01079   //
01080 
01081   Status
01082   __method__OUT_void_getObjectLock_database__IN_oid__OUT_lock_mode(Database *_db, FEMethod_C *_m, Object *_o, const Oid _oid, OqlCtbLockMode::Type &rmode)
01083   {
01084     CHK2DB(db, "database::getObjectLock(oid, rmode)");
01085     LockMode _rmode;
01086     Status s = db->xdb->getObjectLock(_oid, _rmode);
01087     rmode = (OqlCtbLockMode::Type)_rmode;
01088     return s;
01089   }
01090 
01091   //
01092   // void Database_::updateSchema(in string, in string) [oqlctbmthfe.cc]
01093   //
01094 
01095   Status
01096   __method__OUT_void_updateSchema_database__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * odlfile, const char * package)
01097   {
01098     CHK2DB(db, "database::updateSchema(odlfile, package)");
01099     return db->xdb->updateSchema(odlfile, package);
01100   }
01101 
01102   //
01103   // void Database_::updateSchema(in string, in string, in string, in string) [oqlctbmthfe.cc]
01104   //
01105 
01106   Status
01107   __method__OUT_void_updateSchema_database__IN_string__IN_string__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * odlfile, const char * package, const char * schname, const char * db_prefix)
01108   {
01109     CHK2DB(db, "database::updateSchema(odlfile, package, schname, db_prefix)");
01110     return db->xdb->updateSchema(odlfile, package, schname, db_prefix);
01111   }
01112 
01113   //
01114   // void Database_::updateSchema(in string, in string, in string, in string, in string, in string) [oqlctbmthfe.cc]
01115   //
01116 
01117   Status
01118   __method__OUT_void_updateSchema_database__IN_string__IN_string__IN_string__IN_string__IN_string__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * odlfile, const char * package, const char * schname, const char * db_prefix, const char * cpp_cmd, const char * cpp_flags)
01119   {
01120     CHK2DB(db, "database::updateSchema(odlfile, package, schname, db_prefix, cpp_cmd, cpp_flags)");
01121     return db->xdb->updateSchema(odlfile, package, schname, db_prefix,
01122                                  0, cpp_cmd, cpp_flags);
01123   }
01124 
01125   //
01126   // float OqlCtbMath::acos(in float) [oqlctbmthfe.cc]
01127   //
01128 
01129   Status
01130   __method_static_OUT_float_acos_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01131   {
01132     retarg = acos(arg1);
01133     return Success;
01134   }
01135 
01136   //
01137   // float OqlCtbMath::asin(in float) [oqlctbmthfe.cc]
01138   //
01139 
01140   Status
01141   __method_static_OUT_float_asin_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01142   {
01143     retarg = asin(arg1);
01144     return Success;
01145   }
01146 
01147   //
01148   // float OqlCtbMath::atan(in float) [oqlctbmthfe.cc]
01149   //
01150 
01151   Status
01152   __method_static_OUT_float_atan_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01153   {
01154     retarg = atan(arg1);
01155     return Success;
01156   }
01157 
01158   //
01159   // float OqlCtbMath::atan2(in float, in float) [oqlctbmthfe.cc]
01160   //
01161 
01162   Status
01163   __method_static_OUT_float_atan2_math__IN_float__IN_float(Database *_db, FEMethod_C *_m, const double arg1, const double arg2, double &retarg)
01164   {
01165     retarg = atan2(arg1, arg2);
01166     return Success;
01167   }
01168 
01169   //
01170   // float OqlCtbMath::cos(in float) [oqlctbmthfe.cc]
01171   //
01172 
01173   Status
01174   __method_static_OUT_float_cos_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01175   {
01176     retarg = cos(arg1);
01177     return Success;
01178   }
01179 
01180   //
01181   // float OqlCtbMath::sin(in float) [oqlctbmthfe.cc]
01182   //
01183 
01184   Status
01185   __method_static_OUT_float_sin_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01186   {
01187     retarg = sin(arg1);
01188     return Success;
01189   }
01190 
01191   //
01192   // float OqlCtbMath::tan(in float) [oqlctbmthfe.cc]
01193   //
01194 
01195   Status
01196   __method_static_OUT_float_tan_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01197   {
01198     retarg = tan(arg1);
01199     return Success;
01200   }
01201 
01202   //
01203   // float OqlCtbMath::cosh(in float) [oqlctbmthfe.cc]
01204   //
01205 
01206   Status
01207   __method_static_OUT_float_cosh_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01208   {
01209     retarg = cosh(arg1);
01210     return Success;
01211   }
01212 
01213   //
01214   // float OqlCtbMath::sinh(in float) [oqlctbmthfe.cc]
01215   //
01216 
01217   Status
01218   __method_static_OUT_float_sinh_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01219   {
01220     retarg = sinh(arg1);
01221     return Success;
01222   }
01223 
01224   //
01225   // float OqlCtbMath::tanh(in float) [oqlctbmthfe.cc]
01226   //
01227 
01228   Status
01229   __method_static_OUT_float_tanh_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01230   {
01231     retarg = tanh(arg1);
01232     return Success;
01233   }
01234 
01235   //
01236   // float OqlCtbMath::exp(in float) [oqlctbmthfe.cc]
01237   //
01238 
01239   Status
01240   __method_static_OUT_float_exp_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01241   {
01242     retarg = exp(arg1);
01243     return Success;
01244   }
01245 
01246   //
01247   // float OqlCtbMath::log(in float) [oqlctbmthfe.cc]
01248   //
01249 
01250   Status
01251   __method_static_OUT_float_log_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01252   {
01253     retarg = log(arg1);
01254     return Success;
01255   }
01256 
01257   //
01258   // float OqlCtbMath::log10(in float) [oqlctbmthfe.cc]
01259   //
01260 
01261   Status
01262   __method_static_OUT_float_log10_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01263   {
01264     retarg = log10(arg1);
01265     return Success;
01266   }
01267 
01268   //
01269   // float OqlCtbMath::pow(in float, in float) [oqlctbmthfe.cc]
01270   //
01271 
01272   Status
01273   __method_static_OUT_float_pow_math__IN_float__IN_float(Database *_db, FEMethod_C *_m, const double arg1, const double arg2, double &retarg)
01274   {
01275     retarg = pow(arg1, arg2);
01276     return Success;
01277   }
01278 
01279   //
01280   // float OqlCtbMath::sqrt(in float) [oqlctbmthfe.cc]
01281   //
01282 
01283   Status
01284   __method_static_OUT_float_sqrt_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01285   {
01286     retarg = sqrt(arg1);
01287     return Success;
01288   }
01289 
01290   //
01291   // float OqlCtbMath::ceil(in float) [oqlctbmthfe.cc]
01292   //
01293 
01294   Status
01295   __method_static_OUT_float_ceil_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01296   {
01297     retarg = ceil(arg1);
01298     return Success;
01299   }
01300 
01301   //
01302   // float OqlCtbMath::fabs(in float) [oqlctbmthfe.cc]
01303   //
01304 
01305   Status
01306   __method_static_OUT_float_fabs_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01307   {
01308     retarg = fabs(arg1);
01309     return Success;
01310   }
01311 
01312   //
01313   // float OqlCtbMath::floor(in float) [oqlctbmthfe.cc]
01314   //
01315 
01316   Status
01317   __method_static_OUT_float_floor_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01318   {
01319     retarg = floor(arg1);
01320     return Success;
01321   }
01322 
01323   //
01324   // float OqlCtbMath::fmod(in float, in float) [oqlctbmthfe.cc]
01325   //
01326 
01327   Status
01328   __method_static_OUT_float_fmod_math__IN_float__IN_float(Database *_db, FEMethod_C *_m, const double arg1, const double arg2, double &retarg)
01329   {
01330     retarg = fmod(arg1, arg2);
01331     return Success;
01332   }
01333 
01334   //
01335   // float OqlCtbMath::erf(in float) [oqlctbmthfe.cc]
01336   //
01337 
01338   Status
01339   __method_static_OUT_float_erf_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01340   {
01341     retarg = erf(arg1);
01342     return Success;
01343   }
01344 
01345   //
01346   // float OqlCtbMath::erfc(in float) [oqlctbmthfe.cc]
01347   //
01348 
01349   Status
01350   __method_static_OUT_float_erfc_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01351   {
01352     retarg = erfc(arg1);
01353     return Success;
01354   }
01355 
01356   //
01357   // float OqlCtbMath::gamma(in float) [oqlctbmthfe.cc]
01358   //
01359 
01360   Status
01361   __method_static_OUT_float_gamma_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01362   {
01363     retarg = gamma(arg1);
01364     return Success;
01365   }
01366 
01367   //
01368   // float OqlCtbMath::hypot(in float, in float) [oqlctbmthfe.cc]
01369   //
01370 
01371   Status
01372   __method_static_OUT_float_hypot_math__IN_float__IN_float(Database *_db, FEMethod_C *_m, const double arg1, const double arg2, double &retarg)
01373   {
01374     retarg = hypot(arg1, arg2);
01375     return Success;
01376   }
01377 
01378   //
01379   // int32 OqlCtbMath::isnan(in float) [oqlctbmthfe.cc]
01380   //
01381 
01382   Status
01383   __method_static_OUT_int32_isnan_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, eyedblib::int32 &retarg)
01384   {
01385     retarg = eyedblib::eyedb_isnan(arg1);
01386     return Success;
01387   }
01388 
01389   //
01390   // float OqlCtbMath::j0(in float) [oqlctbmthfe.cc]
01391   //
01392 
01393   Status
01394   __method_static_OUT_float_j0_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01395   {
01396     retarg = j0(arg1);
01397     return Success;
01398   }
01399 
01400   //
01401   // float OqlCtbMath::j1(in float) [oqlctbmthfe.cc]
01402   //
01403 
01404   Status
01405   __method_static_OUT_float_j1_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01406   {
01407     retarg = j1(arg1);
01408     return Success;
01409   }
01410 
01411   //
01412   // float OqlCtbMath::jn(in int32, in float) [oqlctbmthfe.cc]
01413   //
01414 
01415   Status
01416   __method_static_OUT_float_jn_math__IN_int32__IN_float(Database *_db, FEMethod_C *_m, const eyedblib::int32 arg1, const double arg2, double &retarg)
01417   {
01418     retarg = jn(arg1, arg2);
01419     return Success;
01420   }
01421 
01422   //
01423   // float OqlCtbMath::lgamma(in float) [oqlctbmthfe.cc]
01424   //
01425 
01426   Status
01427   __method_static_OUT_float_lgamma_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01428   {
01429     retarg = lgamma(arg1);
01430     return Success;
01431   }
01432 
01433   //
01434   // float OqlCtbMath::y0(in float) [oqlctbmthfe.cc]
01435   //
01436 
01437   Status
01438   __method_static_OUT_float_y0_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01439   {
01440     retarg = y0(arg1);
01441     return Success;
01442   }
01443 
01444   //
01445   // float OqlCtbMath::y1(in float) [oqlctbmthfe.cc]
01446   //
01447 
01448   Status
01449   __method_static_OUT_float_y1_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01450   {
01451     retarg = y1(arg1);
01452     return Success;
01453   }
01454 
01455   //
01456   // float OqlCtbMath::yn(in int32, in float) [oqlctbmthfe.cc]
01457   //
01458 
01459   Status
01460   __method_static_OUT_float_yn_math__IN_int32__IN_float(Database *_db, FEMethod_C *_m, const eyedblib::int32 arg1, const double arg2, double &retarg)
01461   {
01462     retarg = yn(arg1, arg2);
01463     return Success;
01464   }
01465 
01466   //
01467   // float OqlCtbMath::acosh(in float) [oqlctbmthfe.cc]
01468   //
01469 
01470   Status
01471   __method_static_OUT_float_acosh_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01472   {
01473     retarg = acosh(arg1);
01474     return Success;
01475   }
01476 
01477   //
01478   // float OqlCtbMath::asinh(in float) [oqlctbmthfe.cc]
01479   //
01480 
01481   Status
01482   __method_static_OUT_float_asinh_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01483   {
01484     retarg = asinh(arg1);
01485     return Success;
01486   }
01487 
01488   //
01489   // float OqlCtbMath::atanh(in float) [oqlctbmthfe.cc]
01490   //
01491 
01492   Status
01493   __method_static_OUT_float_atanh_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01494   {
01495     retarg = atanh(arg1);
01496     return Success;
01497   }
01498 
01499   //
01500   // float OqlCtbMath::cbrt(in float) [oqlctbmthfe.cc]
01501   //
01502 
01503   Status
01504   __method_static_OUT_float_cbrt_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01505   {
01506     retarg = cbrt(arg1);
01507     return Success;
01508   }
01509 
01510   //
01511   // float OqlCtbMath::logb(in float) [oqlctbmthfe.cc]
01512   //
01513 
01514   Status
01515   __method_static_OUT_float_logb_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01516   {
01517     retarg = logb(arg1);
01518     return Success;
01519   }
01520 
01521   //
01522   // float OqlCtbMath::nextafter(in float, in float) [oqlctbmthfe.cc]
01523   //
01524 
01525   Status
01526   __method_static_OUT_float_nextafter_math__IN_float__IN_float(Database *_db, FEMethod_C *_m, const double arg1, const double arg2, double &retarg)
01527   {
01528     retarg = nextafter(arg1, arg2);
01529     return Success;
01530   }
01531 
01532   //
01533   // float OqlCtbMath::remainder(in float, in float) [oqlctbmthfe.cc]
01534   //
01535 
01536   Status
01537   __method_static_OUT_float_remainder_math__IN_float__IN_float(Database *_db, FEMethod_C *_m, const double arg1, const double arg2, double &retarg)
01538   {
01539     retarg = remainder(arg1, arg2);
01540     return Success;
01541   }
01542 
01543   //
01544   // float OqlCtbMath::scalb(in float, in float) [oqlctbmthfe.cc]
01545   //
01546 
01547   Status
01548   __method_static_OUT_float_scalb_math__IN_float__IN_float(Database *_db, FEMethod_C *_m, const double arg1, const double arg2, double &retarg)
01549   {
01550     retarg = scalb(arg1, arg2);
01551     return Success;
01552   }
01553 
01554   //
01555   // float OqlCtbMath::expm1(in float) [oqlctbmthfe.cc]
01556   //
01557 
01558   Status
01559   __method_static_OUT_float_expm1_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01560   {
01561     retarg = expm1(arg1);
01562     return Success;
01563   }
01564 
01565   //
01566   // int32 OqlCtbMath::ilogb(in float) [oqlctbmthfe.cc]
01567   //
01568 
01569   Status
01570   __method_static_OUT_int32_ilogb_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, eyedblib::int32 &retarg)
01571   {
01572     retarg = ilogb(arg1);
01573     return Success;
01574   }
01575 
01576   //
01577   // float OqlCtbMath::log1p(in float) [oqlctbmthfe.cc]
01578   //
01579 
01580   Status
01581   __method_static_OUT_float_log1p_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01582   {
01583     retarg = log1p(arg1);
01584     return Success;
01585   }
01586 
01587   //
01588   // float OqlCtbMath::rint(in float) [oqlctbmthfe.cc]
01589   //
01590 
01591   Status
01592   __method_static_OUT_float_rint_math__IN_float(Database *_db, FEMethod_C *_m, const double arg1, double &retarg)
01593   {
01594     retarg = rint(arg1);
01595     return Success;
01596   }
01597 
01598   //
01599   // dataspace* class::getDefaultInstanceDataspace() [oqlctbmthfe.cc]
01600   //
01601 
01602   Status
01603   __method__OUT_dataspace_REF__getDefaultInstanceDataspace_class(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * &rdsp)
01604   {
01605   
01606     Class *cls = (Class *)_o;
01607     const Dataspace *dataspace;
01608     Status s = cls->getDefaultInstanceDataspace(dataspace);
01609     if (s)
01610       return s;
01611 
01612     rdsp = makeDataspace(_db, dataspace);
01613     return Success;
01614   }
01615 
01616   //
01617   // void class::setDefaultInstanceDataspace(in dataspace*) [oqlctbmthfe.cc]
01618   //
01619 
01620   Status
01621   __method__OUT_void_setDefaultInstanceDataspace_class__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
01622   {
01623     Class *cls = (Class *)_o;
01624 
01625     Status s = cls->setDefaultInstanceDataspace(dsp->xdataspace);
01626     if (s)
01627       return s;
01628 
01629     return Success;
01630   }
01631 
01632   //
01633   // void class::moveInstances(in dataspace*) [oqlctbmthfe.cc]
01634   //
01635 
01636   Status
01637   __method__OUT_void_moveInstances_class__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
01638   {
01639     Class *cls = (Class *)_o;
01640 
01641     Status s = cls->moveInstances(dsp->xdataspace);
01642     if (s)
01643       return s;
01644 
01645     return Success;
01646   }
01647 
01648   //
01649   // int32 index::getCount() [oqlctbmthfe.cc]
01650   //
01651 
01652   Status
01653   __method__OUT_int32_getCount_index(Database *_db, FEMethod_C *_m, Object *_o, eyedblib::int32 &retarg)
01654   {
01655     Index *idx = (Index *)_o;
01656     Status s = Attribute::openMultiIndexRealize(_db, idx);
01657     if (s) return s;
01658     retarg = idx->idx->getCount();
01659     return Success;
01660   }
01661 
01662   static Status
01663   indexGetStats(Database *_db, Object *_o, Bool full, char * &retarg)
01664   {
01665     std::string stats;
01666     Index *idx = (Index *)_o;
01667     Status s = idx->getStats(stats, True, full);
01668     if (s) return s;
01669 
01670     retarg = strdup((std::string("Index: '") + idx->getAttrpath() + "';\n" +
01671                      "Oid: " + idx->getOid().toString() + ";\n" + stats).c_str());
01672     return Success;
01673   }
01674 
01675   //
01676   // string index::getStats() [oqlctbmthfe.cc]
01677   //
01678 
01679   Status
01680   __method__OUT_string_getStats_index(Database *_db, FEMethod_C *_m, Object *_o, char * &retarg)
01681   {
01682     return indexGetStats(_db, _o, False, retarg);
01683   }
01684 
01685   //
01686   // string index::getStats(in bool) [oqlctbmthfe.cc]
01687   //
01688 
01689   Status
01690   __method__OUT_string_getStats_index__IN_bool(Database *_db, FEMethod_C *_m, Object *_o, const Bool full, char * &retarg)
01691   {
01692     return indexGetStats(_db, _o, full, retarg);
01693   }
01694 
01695   //
01696   // string index::getImplementation(in bool) [oqlctbmthfe.cc]
01697   //
01698 
01699   Status
01700   __method__OUT_string_getImplementation_index__IN_bool(Database *_db, FEMethod_C *_m, Object *_o, const Bool local, char * &retarg)
01701   {
01702     Index *idx = (Index *)_o;
01703     IndexImpl *idximpl;
01704     Status s = idx->getImplementation(idximpl, local);
01705     if (s) return s;
01706     retarg = strdup(idximpl->toString().c_str());
01707     if (idximpl)
01708       idximpl->release();
01709     return Success;
01710   }
01711 
01712   //
01713   // dataspace* index::getDefaultDataspace() [oqlctbmthfe.cc]
01714   //
01715 
01716   Status
01717   __method__OUT_dataspace_REF__getDefaultDataspace_index(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * &rdsp)
01718   {
01719     Index *idx = (Index *)_o;
01720     const Dataspace *dataspace;
01721     Status s = idx->getDefaultDataspace(dataspace);
01722     if (s)
01723       return s;
01724       
01725     rdsp = makeDataspace(_db, dataspace);
01726     return Success;
01727   }
01728 
01729   //
01730   // void index::setDefaultDataspace(in dataspace*) [oqlctbmthfe.cc]
01731   //
01732 
01733   Status
01734   __method__OUT_void_setDefaultDataspace_index__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
01735   {
01736     Index *idx = (Index *)_o;
01737     return idx->setDefaultDataspace(dsp->xdataspace);
01738   }
01739 
01740   //
01741   // void index::move(in dataspace*) [oqlctbmthfe.cc]
01742   //
01743 
01744   Status
01745   __method__OUT_void_move_index__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
01746   {
01747     Index *idx = (Index *)_o;
01748     return idx->move(dsp->xdataspace);
01749   }
01750 
01751   //
01752   // string index::simulate(in int32, in string, in bool) [oqlctbmthfe.cc]
01753   //
01754 
01755   static Status
01756   getIndexImpl(Database *db, int idxtype, const char *hints,
01757                IndexImpl *&idximpl)
01758   {
01759     IndexImpl::Type type;
01760     if (idxtype == HashIndexType)
01761       type = IndexImpl::Hash;
01762     else if (idxtype == BTreeIndexType)
01763       type = IndexImpl::BTree;
01764     else
01765       return Exception::make(IDB_ERROR, "invalid index type: expected "
01766                              "HASH_INDEX_TYPE (%d) or BTREE_INDEX_TYPE (%d)",
01767                              HashIndexType, BTreeIndexType);
01768     return IndexImpl::make(db, type, hints, idximpl);
01769   }
01770 
01771   Status
01772   __method__OUT_string_simulate_index__IN_int32__IN_string__IN_bool(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 idxtype, const char * hints, const Bool full, char * &retarg)
01773   {
01774     Status s;
01775     Index *idx = (Index *)_o;
01776 
01777     IndexImpl *idximpl;
01778     s = getIndexImpl(_db, idxtype, hints, idximpl);
01779     if (s) return s;
01780     std::string stats;
01781     s = idx->simulate(*idximpl, stats, True, full);
01782     if (s) return s;
01783     retarg = strdup(stats.c_str());
01784     return Success;
01785   }
01786 
01787   //
01788   // void index::reimplement(in string) [oqlctbmthfe.cc]
01789   //
01790 
01791   Status
01792   __method__OUT_void_reimplement_index__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const char * hints)
01793   {
01794     Status s;
01795     Index *idx = (Index *)_o;
01796 
01797     IndexImpl *idximpl;
01798     s = getIndexImpl(_db, idx->asHashIndex() ? HashIndexType :
01799                      BTreeIndexType, hints, idximpl);
01800     if (s) return s;
01801 
01802     idx->setImplementation(idximpl);
01803     if (idximpl)
01804       idximpl->release();
01805     return idx->store();
01806   }
01807 
01808   //
01809   // oid index::reimplement(in int32, in string) [oqlctbmthfe.cc]
01810   //
01811 
01812   Status
01813   __method__OUT_oid_reimplement_index__IN_int32__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 idxtype, const char * hints, Oid &retarg)
01814   {
01815     Status s;
01816     Index *idx = (Index *)_o;
01817 
01818     IndexImpl *idximpl;
01819     s = getIndexImpl(_db, idxtype, hints, idximpl);
01820     if (s) return s;
01821     Index *idxn;
01822     s = idx->reimplement(*idximpl, idxn);
01823     if (s) return s;
01824     retarg = idxn->getOid();
01825     return Success;
01826   }
01827 
01828   //
01829   // int32 collection::getCount() [oqlctbmthfe.cc]
01830   //
01831 
01832   Status
01833   __method__OUT_int32_getCount_collection(Database *_db, FEMethod_C *_m, Object *_o, eyedblib::int32 &retarg)
01834   {
01835     retarg = dynamic_cast<Collection *>(_o)->getCount();
01836     return Success;
01837   }
01838 
01839   static Status
01840   collectionGetImplStats(Database *_db, Object *_o, Bool full, char * &retarg)
01841   {
01842     Collection *coll = (Collection *)_o;
01843     if (coll->asCollArray()) {
01844       std::string stats1, stats2;
01845       Status s = coll->asCollArray()->getImplStats(stats1, stats2, True, full);
01846       if (s) return s;
01847 
01848       retarg = strdup
01849         ((std::string("Collection: '") +  coll->getName() + "';\n" +
01850           "Oid: " + coll->getOidC().toString() + ";\n" +
01851           "First Index Statistics:\n" + stats1 + "\n" +
01852           "Second Index Statistics:\n" + stats2).c_str());
01853     
01854       return Success;
01855     }
01856 
01857     std::string stats;
01858     Status s = coll->getImplStats(stats, True, full);
01859     if (s) return s;
01860 
01861     retarg = strdup
01862       ((std::string("Collection: '") +  coll->getName() + "';\n" +
01863         "Oid: " + coll->getOidC().toString() + ";\n" + stats).c_str());
01864 
01865     return Success;
01866   }
01867 
01868   //
01869   // string collection::getImplStats() [oqlctbmthfe.cc]
01870   //
01871 
01872   Status
01873   __method__OUT_string_getImplStats_collection(Database *_db, FEMethod_C *_m, Object *_o, char * &retarg)
01874   {
01875     return collectionGetImplStats(_db, _o, False, retarg);
01876   }
01877 
01878   //
01879   // bool collection::isLiteral() [oqlctbmthfe.cc]
01880   //
01881 
01882   Status
01883   __method__OUT_bool_isLiteral_collection(Database *_db, FEMethod_C *_m, Object *_o, Bool &retarg)
01884   {
01885     retarg = dynamic_cast<Collection *>(_o)->isLiteral();
01886     return Success;
01887   }
01888 
01889 //
01890 // bool collection::isPureLiteral() [oqlctbmthfe.cc]
01891 //
01892 
01893   Status
01894 __method__OUT_bool_isPureLiteral_collection(eyedb::Database *_db, eyedb::FEMethod_C *_m, eyedb::Object *_o, eyedb::Bool &retarg)
01895 {
01896 
01897   retarg = dynamic_cast<Collection *>(_o)->isPureLiteral();
01898   return eyedb::Success;
01899 }
01900 
01901 //
01902 // bool collection::isLiteralObject() [oqlctbmthfe.cc]
01903 //
01904 
01905 Status
01906 __method__OUT_bool_isLiteralObject_collection(eyedb::Database *_db, eyedb::FEMethod_C *_m, eyedb::Object *_o, eyedb::Bool &retarg)
01907 {
01908   retarg = dynamic_cast<Collection *>(_o)->isLiteralObject();
01909   return eyedb::Success;
01910 }
01911 
01912 //
01913 // void collection::setLiteralObject() [oqlctbmthfe.cc]
01914 //
01915 
01916 Status
01917 __method__OUT_void_setLiteralObject_collection(eyedb::Database *_db, eyedb::FEMethod_C *_m, eyedb::Object *_o)
01918 {
01919   return dynamic_cast<Collection *>(_o)->setLiteralObject(true);
01920 }
01921 
01922   //
01923   // oid collection::getLiteralOid() [oqlctbmthfe.cc]
01924   //
01925 
01926   Status
01927   __method__OUT_oid_getLiteralOid_collection(Database *_db, FEMethod_C *_m, Object *_o, Oid &retarg)
01928   {
01929     if (dynamic_cast<Collection *>(_o)->isLiteral())
01930       retarg = dynamic_cast<Collection *>(_o)->getOidC();
01931     return Success;
01932   }
01933 
01934   //
01935   // string collection::getImplStats(in bool) [oqlctbmthfe.cc]
01936   //
01937 
01938   Status
01939   __method__OUT_string_getImplStats_collection__IN_bool(Database *_db, FEMethod_C *_m, Object *_o, const Bool full, char * &retarg)
01940   {
01941     return collectionGetImplStats(_db, _o, full, retarg);
01942   }
01943 
01944   //
01945   // dataspace* collection::getDefaultDataspace() [oqlctbmthfe.cc]
01946   //
01947 
01948   Status
01949   __method__OUT_dataspace_REF__getDefaultDataspace_collection(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * &rdsp)
01950   {
01951     Collection *coll = (Collection *)_o;
01952     const Dataspace *dataspace;
01953     Status s = coll->getDefaultDataspace(dataspace);
01954     if (s)
01955       return s;
01956 
01957     rdsp = makeDataspace(_db, dataspace);
01958     return Success;
01959   }
01960 
01961   //
01962   // void collection::setDefaultDataspace(in dataspace*) [oqlctbmthfe.cc]
01963   //
01964 
01965   Status
01966   __method__OUT_void_setDefaultDataspace_collection__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
01967   {
01968     Collection *coll = (Collection *)_o;
01969 
01970     Status s = coll->setDefaultDataspace(dsp->xdataspace);
01971     if (s)
01972       return s;
01973 
01974     return Success;
01975   }
01976 
01977   //
01978   // void collection::moveElements(in dataspace*) [oqlctbmthfe.cc]
01979   //
01980 
01981   Status
01982   __method__OUT_void_moveElements_collection__IN_dataspace_REF_(Database *_db, FEMethod_C *_m, Object *_o, OqlCtbDataspace * dsp)
01983   {
01984     Collection *coll = (Collection *)_o;
01985 
01986     Status s = coll->moveElements(dsp->xdataspace);
01987     if (s)
01988       return s;
01989 
01990     return Success;
01991   }
01992 
01993 
01994   //
01995   // string collection::getImplementation(in bool) [oqlctbmthfe.cc]
01996   //
01997 
01998   Status
01999   __method__OUT_string_getImplementation_collection__IN_bool(Database *_db, FEMethod_C *_m, Object *_o, const Bool local, char * &retarg)
02000   {
02001     Collection *coll = (Collection *)_o;
02002     IndexImpl *idximpl;
02003     Status s = coll->getImplementation(idximpl, local);
02004     if (s) return s;
02005     retarg = idximpl ? strdup(idximpl->toString().c_str()) : 0;
02006     return Success;
02007   }
02008 
02009   //
02010   // string collection::simulate(in int32, in string, in bool) [oqlctbmthfe.cc]
02011   //
02012 
02013   Status
02014   __method__OUT_string_simulate_collection__IN_int32__IN_string__IN_bool(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 idxtype, const char * hints, const Bool full, char * &retarg)
02015   {
02016     Status s;
02017     Collection *coll = (Collection *)_o;
02018     IndexImpl *idximpl;
02019 
02020     s = getIndexImpl(_db, idxtype, hints, idximpl);
02021     if (s) return s;
02022 
02023     std::string stats;
02024     s = coll->simulate(*idximpl, stats, True, full);
02025     if (s) return s;
02026     retarg = strdup(stats.c_str());
02027     return Success;
02028   }
02029 
02030   //
02031   // void collection::reimplement(in int32, in string) [oqlctbmthfe.cc]
02032   //
02033 
02034   Status
02035   __method__OUT_void_reimplement_collection__IN_int32__IN_string(Database *_db, FEMethod_C *_m, Object *_o, const eyedblib::int32 idxtype, const char * hints)
02036   {
02037     Status s;
02038     Collection *coll = (Collection *)_o;
02039 
02040     IndexImpl *idximpl;
02041     s = getIndexImpl(_db, idxtype, hints, idximpl);
02042     if (s) return s;
02043 
02044     coll->setImplementation(idximpl);
02045     if (idximpl)
02046       idximpl->release();
02047     if (coll->isLiteral())
02048       return coll->getMasterObject(true)->store();
02049     return coll->store();
02050   }

Generated on Mon Dec 22 18:16:04 2008 for eyedb by  doxygen 1.5.3