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
00031 #ifndef __VDBL_DATABASE_H
00032 #define __VDBL_DATABASE_H
00033
00034 #define HAVE_VTABLE 0
00035
00036 #include <algorithm>
00037 #include <map>
00038 #include <vdbl_config.h>
00039 #include <vdbl_types.h>
00040 #include <vdbl_table.h>
00041 #include <vdbl_user.h>
00042 #include <vdbl_view.h>
00043 #include <vdbl_stview.h>
00044 #if HAVE_VTABLE
00045 #include <vdbl_vtable.h>
00046 #endif
00047
00048 __VDBL_BEGIN_NAMESPACE
00049
00050 #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
00051 #pragma set woff 1209
00052 #endif
00053
00055
00060 class _VDBL_userflags
00061 {
00062 public:
00071 struct
00072 {
00073 bool all_tables_write;
00074 bool all_tables_read;
00075 bool all_tables_modify;
00076 bool all_tables_append;
00077 bool all_tables_delete;
00078 } table_privileges;
00079
00084 struct
00085 {
00086 bool all_views_commit_to_parent;
00087 } view_privileges;
00088
00089 public:
00093 _VDBL_userflags() : table_privileges(), view_privileges() {}
00097 _VDBL_userflags(const _VDBL_userflags& _a)
00098 : table_privileges(_a.table_privileges),
00099 view_privileges(_a.view_privileges) {}
00103 virtual ~_VDBL_userflags() {}
00104 };
00105
00107
00112 class _VDBL_aclentry
00113 {
00114 public:
00116
00119 bool read;
00120 bool write;
00121 bool append;
00122 bool drop;
00123 bool commit_to_parent;
00125
00126 public:
00130 _VDBL_aclentry(bool _r = false, bool _a = false, bool _w = false,
00131 bool _d = false, bool _ctp = false)
00132 : read(_r), write(_w), append(_a), drop(false),
00133 commit_to_parent(_ctp)
00134 {}
00135
00139 _VDBL_aclentry(const _VDBL_aclentry& _a) : read(_a.read),
00140 write(_a.write), append(_a.append), drop(_a.drop),
00141 commit_to_parent(_a.commit_to_parent)
00142 {}
00143
00147 virtual ~_VDBL_aclentry() {}
00148
00152 _VDBL_aclentry& operator=(const _VDBL_aclentry& __a)
00153 {
00154 read = __a.read;
00155 write = __a.write;
00156 append = __a.append;
00157 drop = __a.drop;
00158 commit_to_parent = __a.commit_to_parent;
00159 return *this;
00160 }
00161 };
00162
00164
00170 class _VDBL_acl
00171 {
00172 public:
00176 _VDBL_aclentry global;
00180 std::map<_VDBL_colid,_VDBL_aclentry> colwise;
00181
00182 public:
00186 _VDBL_acl(bool _gr = false, bool _ga = false, bool _gw = false,
00187 bool _gd = false, bool _gctp = false)
00188 : global(_gr,_ga,_gw,_gd,_gctp), colwise() {}
00189
00193 _VDBL_acl(const _VDBL_acl& _a) : global(_a.global), colwise(_a.colwise) {}
00194
00195
00199 virtual ~_VDBL_acl() {}
00200
00204 _VDBL_acl& operator=(const _VDBL_acl& __a)
00205 {
00206 global = __a.global;
00207 colwise = __a.colwise;
00208 return *this;
00209 }
00210 };
00211
00213
00218 class _VDBL_tableflags
00219 {
00220 public:
00221
00225 bool temporary;
00229 bool unrestricted;
00233 _VDBL_acl global;
00237 std::map<_VDBL_userid,_VDBL_acl> ACLs;
00238
00239 public:
00243 _VDBL_tableflags(bool _temp = false, bool _unrest = true) :
00244 temporary(_temp), unrestricted(_unrest), global(), ACLs()
00245 {}
00246
00250 _VDBL_tableflags(const _VDBL_acl& _gacl, bool _temp = false,
00251 bool _unrest = true) : temporary(_temp),
00252 unrestricted(_unrest), global(_gacl), ACLs()
00253 {}
00254
00258 _VDBL_tableflags(const _VDBL_tableflags& __t) :
00259 temporary(__t.temporary), unrestricted(__t.unrestricted),
00260 global(__t.global), ACLs(__t.ACLs)
00261 {}
00262
00266 virtual ~_VDBL_tableflags() {}
00267
00271 _VDBL_tableflags& operator=(const _VDBL_tableflags& __t)
00272 {
00273 temporary = __t.temporary;
00274 unrestricted = __t.unrestricted;
00275 global = __t.global;
00276 ACLs = __t.ACLs;
00277 return *this;
00278 }
00279 };
00280
00282
00287 class _VDBL_viewflags
00288 {
00289 public:
00293 _VDBL_acl global;
00297 std::map<_VDBL_userid,_VDBL_acl> ACLs;
00298
00299 public:
00303 _VDBL_viewflags() : global(), ACLs() {}
00304
00308 _VDBL_viewflags(const _VDBL_acl& _gacl) : global(_gacl), ACLs() {}
00309
00313 _VDBL_viewflags(const _VDBL_viewflags& __v) :
00314 global(__v.global), ACLs(__v.ACLs) {}
00318 virtual ~_VDBL_viewflags() {}
00319
00323 _VDBL_viewflags& operator=(const _VDBL_viewflags& __v)
00324 {
00325 global = __v.global;
00326 ACLs = __v.ACLs;
00327 return *this;
00328 }
00329 };
00330
00332
00337 class _VDBL_database
00338 {
00339 private:
00341 typedef std::pair<_VDBL_tableflags,_VDBL_table*> _D_table_entry;
00343 typedef std::map<std::string, _VDBL_tableid> _D_table_names;
00345 typedef std::map<_VDBL_tableid, _D_table_entry> _D_tables;
00346
00348 typedef std::triple<_VDBL_userid,_VDBL_userflags,_VDBL_user> _D_user_entry;
00350 typedef std::map<std::string, _D_user_entry> _D_users;
00351
00353 typedef std::pair<_VDBL_viewflags,_VDBL_view*> _D_view_entry;
00355 typedef std::map<std::string, _VDBL_viewid> _D_view_names;
00357 typedef std::map<_VDBL_viewid, _D_view_entry> _D_views;
00358
00360
00361 _VDBL_tableid _D_ti;
00362 _VDBL_userid _D_ui;
00363 _VDBL_viewid _D_vi;
00365
00369 _D_table_names _D_tn;
00373 _D_tables _D_t;
00377 _D_users _D_u;
00381 _D_view_names _D_vn;
00385 _D_views _D_v;
00386
00387 protected:
00389
00392 _VDBL_tableid get_tableid() { return ++_D_ti; }
00393 _VDBL_userid get_userid() { return ++_D_ui; }
00394 _VDBL_viewid get_viewid() { return ++_D_vi; }
00396
00397 public:
00398
00406 bool create_table(const std::string& _C_i, const _VDBL_userid& _C_u,
00407 const _VDBL_tableflags& __f = _VDBL_tableflags())
00408 {
00409
00410 _D_table_names::iterator __t(_D_tn.find(_C_i));
00411 if(__t != _D_tn.end())
00412 return false;
00413 _VDBL_table* _ntb = (_VDBL_table*) new _VDBL_standardtable;
00414 _VDBL_tableid _ti(get_tableid());
00415 _D_tn.insert(std::make_pair(_C_i,_ti));
00416 _D_t.insert(std::make_pair(_ti,std::make_pair(__f,_ntb)));
00417 return true;
00418 }
00419
00420 #if HAVE_VTABLE
00421
00429 bool create_table(const std::string& _C_i, const _VDBL_userid& _C_u,
00430 const _VDBL_tableflags& __f = _VDBL_tableflags(),
00431 const _VDBL_view& __v)
00432 {
00433
00434 _D_table_names::iterator __t(_D_tn.find(_C_i));
00435 if(__t != _D_tn.end())
00436 return false;
00437 _VDBL_table* _ntb = (_VDBL_table*) new _VDBL_viewtable(__v);
00438 _VDBL_tableid _ti(get_tableid());
00439 _D_tn.insert(std::make_pair(_C_i,_ti));
00440 _D_t.insert(std::make_pair(_ti,std::make_pair(__f,_ntb)));
00441 return true;
00442 }
00443 #endif
00444
00448 _VDBL_tableid get_tableid(const std::string& _C_i,
00449 const _VDBL_userid& _C_u) const
00450 {
00451
00452 _D_table_names::const_iterator __t(_D_tn.find(_C_i));
00453 if(__t == _D_tn.end())
00454 return _VDBL_tableid();
00455 else
00456 return (*__t).second;
00457 }
00458
00459 bool alter_table(const _VDBL_tableid& _ti, const _VDBL_userid& _C_u)
00460 { throw "alter_table: NYI"; }
00461
00462 bool alter_table(const std::string& _C_i, const _VDBL_userid& _C_u)
00463 { return alter_table(get_tableid(_C_i, _C_u), _C_u); }
00464
00471 bool drop_table(const _D_tables::iterator& __t,
00472 const _D_table_names::iterator& __tn,
00473 const _VDBL_userid& _C_u)
00474 {
00475 bool ret(true);
00476
00477 if(__t != _D_t.end())
00478 {
00479 _VDBL_table* _otb = (*__t).second.second;
00480 delete _otb;
00481 _D_t.erase(__t);
00482 }
00483 else
00484 ret = false;
00485 if(__tn != _D_tn.end())
00486 _D_tn.erase(__tn);
00487 else
00488 ret = false;
00489 return ret;
00490 }
00491
00496 bool drop_table(const _VDBL_tableid& _C_i, const _VDBL_userid& _C_u)
00497 {
00498 _D_table_names::iterator __t;
00499 for(__t = _D_tn.begin(); __t != _D_tn.end(); ++__t)
00500 if((*__t).second == _C_i)
00501 break;
00502 return drop_table(_D_t.find(_C_i), __t, _C_u);
00503 }
00504
00509 bool drop_table(const std::string& _C_i, const _VDBL_userid& _C_u)
00510 {
00511 _VDBL_tableid _ti(get_tableid(_C_i, _C_u));
00512 return drop_table(_D_t.find(_ti), _D_tn.find(_C_i), _C_u);
00513 }
00514
00518 bool has_table(const _VDBL_tableid& _C_i, const _VDBL_userid& _C_u) const
00519 {
00520 _D_tables::const_iterator __t(_D_t.find(_C_i));
00521 if(__t == _D_t.end())
00522 return false;
00523 else
00524 return true;
00525 }
00526
00530 bool has_table(const std::string& _C_i, const _VDBL_userid& _C_u) const
00531 { return has_table(get_tableid(_C_i, _C_u), _C_u); }
00532
00533 public:
00537 _VDBL_table* get_table(const _VDBL_tableid& _C_i, const _VDBL_userid& _C_u)
00538 const
00539 {
00540
00541 _D_tables::const_iterator __t(_D_t.find(_C_i));
00542 if(__t == _D_t.end())
00543 return NULL;
00544 return (*__t).second.second;
00545 }
00546
00550 _VDBL_table* get_table(const std::string& _C_i, const _VDBL_userid& _C_u) const
00551 { return get_table(get_tableid(_C_i, _C_u), _C_u); }
00552
00553 private:
00557 _VDBL_view* get_table_view(const _VDBL_tableid& _C_i,
00558 const _VDBL_context& __c, const _V_enum& __e) const
00559 {
00560 _D_tables::const_iterator __t(_D_t.find(_C_i));
00561 if(__t == _D_t.end())
00562 return NULL;
00563 _VDBL_view* __v = new
00564 _VDBL_standardview(_C_i, (*__t).second.second, __c, __e);
00565 return __v;
00566 }
00567
00571 _VDBL_view* get_table_view(const std::string& _C_i, const _VDBL_context& __c,
00572 const _V_enum& __e) const
00573 {
00574 _D_table_names::const_iterator _ti(_D_tn.find(_C_i));
00575 if(_ti == _D_tn.end())
00576 return NULL;
00577 return get_table_view((*_ti).second, __c, __e);
00578 }
00579
00586 template < template <class _TT, class _TA> class _SqCtr, class _Al >
00587 _VDBL_view* get_table_view(const _VDBL_tableid& _C_i,
00588 const _VDBL_context& __c, const _V_enum& __e,
00589 const _SqCtr<std::pair<_VDBL_tableid,_VDBL_rowid>, _Al>& _Ct) const
00590 {
00591 _D_tables::const_iterator __t(_D_t.find(_C_i));
00592 if(__t == _D_t.end())
00593 return NULL;
00594 std::vector<_VDBL_rowid> _r;
00595 typename _SqCtr<std::pair<_VDBL_tableid,_VDBL_rowid>, _Al>::const_iterator _a;
00596 _r.reserve(_Ct.size());
00597 for(_a = _Ct.begin(); _a != _Ct.end(); ++_a)
00598 if(_C_i == (*_a).first)
00599 _r.push_back((*_a).second);
00600 _VDBL_view* __v = new _VDBL_standardview(_C_i, (*__t).second.second,
00601 __c, __e, _r);
00602 return __v;
00603 }
00604
00611 template < template <class _TT, class _TA> class _SqCtr, class _Al >
00612 _VDBL_view* get_table_view(const std::string& _C_i, const _VDBL_context& __c,
00613 const _V_enum& __e,
00614 const _SqCtr<std::pair<_VDBL_tableid,_VDBL_rowid>, _Al>& _Ct) const
00615 {
00616 _D_table_names::const_iterator _ti(_D_tn.find(_C_i));
00617 if(_ti == _D_tn.end())
00618 return NULL;
00619 return get_table_view((*_ti).second, __c, __e, _Ct);
00620 }
00621
00626 template < template <class _TT, class _TA> class _SqCtr, class _Al >
00627 bool add_to_table_view(_VDBL_view* __v, const _VDBL_tableid& _C_i,
00628 const _SqCtr<std::pair<_VDBL_tableid,_VDBL_rowid>, _Al>& _Ct) const
00629 {
00630 std::vector<_VDBL_rowid> _r;
00631 typename _SqCtr<std::pair<_VDBL_tableid,_VDBL_rowid>, _Al>::const_iterator _a;
00632 _r.reserve(_Ct.size());
00633 for(_a = _Ct.begin(); _a != _Ct.end(); ++_a)
00634 if(_C_i == (*_a).first)
00635 _r.push_back((*_a).second);
00636 return __v->add_visible(_r);
00637 }
00638
00643 template < template <class _TT, class _TA> class _SqCtr, class _Al >
00644 bool rm_from_table_view(_VDBL_view* __v, const _VDBL_tableid& _C_i,
00645 const _SqCtr<std::pair<_VDBL_tableid,_VDBL_rowid>, _Al>& _Ct) const
00646 {
00647 std::vector<_VDBL_rowid> _r;
00648 typename _SqCtr<std::pair<_VDBL_tableid,_VDBL_rowid>, _Al>::const_iterator _a;
00649 _r.reserve(_Ct.size());
00650 for(_a = _Ct.begin(); _a != _Ct.end(); ++_a)
00651 if(_C_i == (*_a).first)
00652 _r.push_back((*_a).second);
00653 return __v->rm_visible(_r);
00654 }
00655
00656 public:
00657
00661 _VDBL_viewid get_viewid(const std::string& _C_i, const _VDBL_userid& _C_u) const
00662 {
00663 _D_view_names::const_iterator __v(_D_vn.find(_C_i));
00664 if(__v == _D_vn.end())
00665 return _VDBL_viewid();
00666 else
00667 return (*__v).second;
00668 }
00669
00675 bool create_view(const std::string& _C_i, const _VDBL_userid& _C_u,
00676 const _VDBL_context& __c,
00677 const std::string& _C_t, const _V_enum& __e)
00678 {
00679
00680 _D_view_names::iterator __v(_D_vn.find(_C_i));
00681 if(__v != _D_vn.end())
00682 return false;
00683 _VDBL_view* __vi = get_table_view(_C_t, __c, __e);
00684 if(__vi == NULL)
00685 return false;
00686 _VDBL_viewid _vid(get_viewid());
00687 _D_vn.insert(std::make_pair(_C_i,_vid));
00688 _D_v.insert(std::make_pair(_vid, std::make_pair(_VDBL_viewflags(),__vi)));
00689 return true;
00690 }
00691
00692 bool alter_view(const _VDBL_viewid& _C_i, const _VDBL_userid& _C_u)
00693 { throw "alter_view: NYI"; }
00694
00695 bool alter_view(const std::string& _C_i, const _VDBL_userid& _C_u)
00696 { return alter_view(get_viewid(_C_i, _C_u), _C_u); }
00697
00704 bool drop_view(const _D_views::iterator& __v,
00705 const _D_view_names::iterator& __vn,
00706 const _VDBL_userid& _C_u)
00707 {
00708 bool ret(true);
00709
00710 if(__v != _D_v.end())
00711 {
00712 _VDBL_view* _ovw = (*__v).second.second;
00713 delete _ovw;
00714 _D_v.erase(__v);
00715 }
00716 else
00717 ret = false;
00718 if(__vn != _D_vn.end())
00719 _D_vn.erase(__vn);
00720 else
00721 ret = false;
00722 return ret;
00723 }
00724
00729 bool drop_view(const _VDBL_viewid& _C_i, const _VDBL_userid& _C_u)
00730 {
00731 _D_view_names::iterator __v;
00732 for(__v = _D_vn.begin(); __v != _D_vn.end(); ++__v)
00733 if((*__v).second == _C_i)
00734 break;
00735 return drop_view(_D_v.find(_C_i), __v, _C_u);
00736 }
00737
00742 bool drop_view(const std::string& _C_i, const _VDBL_userid& _C_u)
00743 {
00744 _VDBL_viewid _vi(get_viewid(_C_i, _C_u));
00745 return drop_view(_D_v.find(_vi), _D_vn.find(_C_i), _C_u);
00746 }
00747
00751 bool has_view(const _VDBL_viewid& _C_i, const _VDBL_userid& _C_u) const
00752 {
00753 _D_views::const_iterator __v(_D_v.find(_C_i));
00754 if(__v == _D_v.end())
00755 return false;
00756 else
00757 return true;
00758 }
00759
00763 bool has_view(const std::string& _C_i, const _VDBL_userid& _C_u) const
00764 { return has_view(get_viewid(_C_i, _C_u), _C_u); }
00765
00769 _VDBL_view* get_view(const _VDBL_viewid& _C_i, const _VDBL_userid& _C_u) const
00770 {
00771
00772 _D_views::const_iterator __v(_D_v.find(_C_i));
00773 if(__v == _D_v.end())
00774 return NULL;
00775 return (*__v).second.second;
00776 }
00777
00781 _VDBL_view* get_view(const std::string& _C_i, const _VDBL_userid& _C_u) const
00782 { return get_view(get_viewid(_C_i,_C_u), _C_u); }
00783
00784 bool create_user(const std::string& _C_i) { throw "create_user: NYI"; }
00785 bool alter_user(const std::string& _C_i) { throw "alter_user: NYI"; }
00786 bool drop_user(const std::string& _C_i) { throw "drop_user: NYI"; }
00787 const _VDBL_userid& get_user(const std::string& _C_i) const
00788 { throw "get_user: NYI"; }
00789 bool has_user(const std::string& _C_i) const { throw "has_user: NYI"; }
00790
00794 _VDBL_database() : _D_ti(), _D_ui(), _D_vi(), _D_tn(),
00795 _D_t(), _D_u(), _D_vn(), _D_v() {}
00796
00800 _VDBL_database(const _VDBL_database& __t)
00801 : _D_ti(__t._D_ti), _D_ui(__t._D_ui), _D_vi(__t._D_vi),
00802 _D_tn(__t._D_tn), _D_t(__t._D_t), _D_u(__t._D_u),
00803 _D_vn(__t._D_vn), _D_v(__t._D_v)
00804 {
00805 for(_D_tables::iterator __x = _D_t.begin(); __x != _D_t.end(); ++__x)
00806 (*__x).second.second = (*__x).second.second->new_copy();
00807 for(_D_views::iterator __x = _D_v.begin(); __x != _D_v.end(); ++__x)
00808 (*__x).second.second = (*__x).second.second->new_copy();
00809 }
00810
00814 virtual ~_VDBL_database()
00815 {
00816 for(_D_tables::iterator __x = _D_t.begin(); __x != _D_t.end(); ++__x)
00817 delete (*__x).second.second;
00818 for(_D_views::iterator __x = _D_v.begin(); __x != _D_v.end(); ++__x)
00819 delete (*__x).second.second;
00820 }
00821
00822 friend class _VDBL_viewdbase;
00823 };
00824
00826
00831 class database : public _VDBL_database
00832 {
00833 private:
00834 typedef _VDBL_database _Base;
00835
00836 public:
00837 typedef _VDBL_table table;
00838 typedef _VDBL_view view;
00839 typedef _VDBL_user user;
00840
00841 public:
00849 bool create_table(const std::string& _C_i, const _VDBL_userid& _C_u,
00850 const _VDBL_tableflags& __f = _VDBL_tableflags())
00851 { return _Base::create_table(_C_i, _C_u, __f); }
00859 bool create_table(const char* _C_i, const _VDBL_userid& _C_u,
00860 const _VDBL_tableflags& __f = _VDBL_tableflags())
00861 { return create_table(std::string(_C_i), _C_u, __f); }
00862 #if HAVE_VTABLE
00863
00871 bool create_table(const char* _C_i, const _VDBL_userid& _C_u,
00872 const _VDBL_tableflags& __f = _VDBL_tableflags(),
00873 const _VDBL_view& __v)
00874 { return _Base::create_table(std::string(_C_i), _C_u, __f, __v); }
00875 #endif
00876 bool alter_table(const std::string& _C_i, const _VDBL_userid& _C_u)
00877 { return _Base::alter_table(_C_i, _C_u); }
00878 bool alter_table(const char* _C_i, const _VDBL_userid& _C_u)
00879 { return _Base::alter_table(std::string(_C_i), _C_u); }
00884 bool drop_table(const std::string& _C_i, const _VDBL_userid& _C_u)
00885 { return _Base::drop_table(_C_i, _C_u); }
00890 bool drop_table(const char* _C_i, const _VDBL_userid& _C_u)
00891 { return _Base::drop_table(std::string(_C_i), _C_u); }
00895 bool has_table(const std::string& _C_i, const _VDBL_userid& _C_u) const
00896 { return _Base::has_table(_C_i, _C_u); }
00900 bool has_table(const char* _C_i, const _VDBL_userid& _C_u) const
00901 { return _Base::has_table(std::string(_C_i), _C_u); }
00907 bool create_view(const std::string& _C_i, const _VDBL_userid& _C_u,
00908 const _VDBL_context& __c,
00909 const std::string& _C_t, const _V_enum& __e)
00910 { return _Base::create_view(_C_i, _C_u, __c, _C_t, __e); }
00916 bool create_view(const char* _C_i, const _VDBL_userid& _C_u,
00917 const _VDBL_context& __c,
00918 const std::string& _C_t, const _V_enum& __e)
00919 { return _Base::create_view(std::string(_C_i), _C_u, __c, _C_t, __e); }
00925 bool create_view(const std::string& _C_i, const _VDBL_userid& _C_u,
00926 const _VDBL_context& __c,
00927 const char* _C_t, const _V_enum& __e)
00928 { return _Base::create_view(_C_i, _C_u, __c, std::string(_C_t), __e); }
00934 bool create_view(const char* _C_i, const _VDBL_userid& _C_u,
00935 const _VDBL_context& __c,
00936 const char* _C_t, const _V_enum& __e)
00937 { return _Base::create_view(std::string(_C_i), _C_u, __c,
00938 std::string(_C_t), __e); }
00939 bool alter_view(const std::string& _C_i, const _VDBL_userid& _C_u)
00940 { return _Base::alter_view(_C_i, _C_u); }
00941 bool alter_view(const char* _C_i, const _VDBL_userid& _C_u)
00942 { return _Base::alter_view(std::string(_C_i), _C_u); }
00947 bool drop_view(const std::string& _C_i, const _VDBL_userid& _C_u)
00948 { return _Base::drop_view(_C_i, _C_u); }
00953 bool drop_view(const char* _C_i, const _VDBL_userid& _C_u)
00954 { return _Base::drop_view(std::string(_C_i), _C_u); }
00958 bool has_view(const std::string& _C_i, const _VDBL_userid& _C_u) const
00959 { return _Base::has_view(_C_i, _C_u); }
00963 bool has_view(const char* _C_i, const _VDBL_userid& _C_u) const
00964 { return _Base::has_view(std::string(_C_i), _C_u); }
00968 viewbase* get_view(const std::string& _C_i, const _VDBL_userid& _C_u) const
00969 { return (viewbase*)_Base::get_view(_C_i, _C_u); }
00973 viewbase* get_view(const char* _C_i, const _VDBL_userid& _C_u) const
00974 { return (viewbase*)_Base::get_view(std::string(_C_i), _C_u); }
00975 bool create_user(const char* _C_i)
00976 { return _Base::create_user(std::string(_C_i)); }
00977 bool create_user(const std::string& _C_i)
00978 { return _Base::create_user(_C_i); }
00979 bool alter_user(const char* _C_i)
00980 { return _Base::alter_user(std::string(_C_i)); }
00981 bool alter_user(const std::string& _C_i)
00982 { return _Base::alter_user(_C_i); }
00983 bool drop_user(const char* _C_i)
00984 { return _Base::drop_user(std::string(_C_i)); }
00985 bool drop_user(const std::string& _C_i)
00986 { return _Base::drop_user(_C_i); }
00987 const _VDBL_userid& get_user(const char* _C_i) const
00988 { return _Base::get_user(std::string(_C_i)); }
00989 const _VDBL_userid& get_user(const std::string& _C_i) const
00990 { return _Base::get_user(_C_i); }
00991 bool has_user(const char* _C_i) const
00992 { return _Base::has_user(std::string(_C_i)); }
00993 bool has_user(const std::string& _C_i) const
00994 { return _Base::has_user(_C_i); }
00998 table* get_table(const tableid& _C_i, const _VDBL_userid& _C_u) const
00999 { return (table*)_Base::get_table(_C_i,_C_u); }
01003 table* get_table(const std::string& _C_i, const _VDBL_userid& _C_u) const
01004 { return (table*)_Base::get_table(_C_i,_C_u); }
01008 table* get_table(const char* _C_i, const _VDBL_userid& _C_u) const
01009 { return get_table(std::string(_C_i),_C_u); }
01010 };
01011
01013
01017 typedef _VDBL_userflags userflags;
01019
01023 typedef _VDBL_viewflags viewflags;
01025
01029 typedef _VDBL_tableflags tableflags;
01030
01032
01036 typedef _VDBL_aclentry aclentry;
01038
01042 typedef _VDBL_acl acl;
01043
01044 #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
01045 #pragma reset woff 1209
01046 #endif
01047
01048 __VDBL_END_NAMESPACE
01049
01050 #endif
01051
01052
01053
01054