DBM.odl

00001 /* 
00002    EyeDB Object Database Management System
00003    Copyright (C) 1994-1999,2004,2005 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 //
00025 // DBM database schema description
00026 //
00027 
00028 enum system_access_mode [SysAccessMode] {
00029   NO_SYSACCESS_MODE [NoSysAccessMode] = 0x000,
00030   DB_CREATE_SYSACCESS_MODE [DBCreateSysAccessMode] = 0x100,
00031   ADD_USER_SYSACCESS_MODE [AddUserSysAccessMode] = 0x200,
00032   DELETE_USER_SYSACCESS_MODE [DeleteUserSysAccessMode] = 0x400,
00033   SET_USER_PASSWD_SYSACCESS_MODE [SetUserPasswdSysAccessMode] = 0x800,
00034   ADMIN_SYSACCESS_MODE [AdminSysAccessMode] = 0x300,
00035   SUPERUSER_SYSACCESS_MODE [SuperUserSysAccessMode] = 0xFFF
00036 };
00037 
00038 enum database_access_mode [DBAccessMode] {
00039   NO_DBACCESS_MODE [NoDBAccessMode] = 0x00,
00040   READ_DBACCESS_MODE [ReadDBAccessMode] = 0x10,
00041   WRITE_DBACCESS_MODE [WriteDBAccessMode] = 0x20,
00042   EXEC_DBACCESS_MODE [ExecDBAccessMode] = 0x40,
00043   READ_WRITE_DBACCESS_MODE [ReadWriteDBAccessMode] = 0x30,
00044   READ_EXEC_DBACCESS_MODE [ReadExecDBAccessMode] = 0x50,
00045   READ_WRITE_EXEC_DBACCESS_MODE [ReadWriteExecDBAccessMode] = 0x70,
00046   ADMIN_DBACCESS_MODE [AdminDBAccessMode] = 0x71
00047 };
00048 
00049 enum user_type [UserType] {
00050   EYEDB_USER [EyeDBUser] = 1,
00051   UNIX_USER [UnixUser],
00052   STRICT_UNIX_USER [StrictUnixUser]
00053 };
00054 
00055 class user_entry [UserEntry] {
00056   string name;
00057   string passwd;
00058   int uid;
00059   user_type #type;
00060 
00061   constraint<unique> on name;
00062   index on name;
00063   index on uid;
00064 };
00065 
00066 class database_user_access [DBUserAccess] {
00067   database_entry *dbentry;
00068   user_entry *user;
00069   database_access_mode mode;
00070 
00071   index on dbentry;
00072   index on user;
00073 };
00074 
00075 class system_user_access [SysUserAccess] {
00076   user_entry *user;
00077   system_access_mode mode;
00078 
00079   index on user;
00080 };
00081 
00082 class database_entry [DBEntry] {
00083   string dbname;
00084   int dbid;
00085   string dbfile;
00086   database_access_mode default_access;
00087   object *schm;
00088   string comment;  
00089   database_property *props[];
00090 
00091   constraint<unique> on dbname;
00092   index on dbname;
00093   index on dbid;
00094 };
00095 
00096 class database_property_value [DBPropertyValue] {
00097   int64 ival;
00098   string sval;
00099   byte bval[];
00100   object *oval;
00101 };
00102 
00103 class database_property [DBProperty] {
00104   string key;
00105   database_property_value value;
00106 
00107   index on key;
00108 };

Generated on Mon Dec 22 18:15:54 2008 for eyedb by  doxygen 1.5.3