Beispiel #1
0
        public Table GetPrimitiveTable(string tableName, BangDBPrimitiveDataType dataType = BangDBPrimitiveDataType.PrimitiveLong, DBOpenType flag = DBOpenType.Opencreate, TableEnv tblEnv = null)
        {
            IntPtr _tblenv = tblEnv == null ? IntPtr.Zero : tblEnv.GetHandle();
            IntPtr _tbl    = BangDBNative.GetPrimitiveTable(_database, tableName, (int)dataType, (int)flag, _tblenv);

            return((_tbl != IntPtr.Zero) ? new Table(tableName, _tbl) : null);
        }
Beispiel #2
0
        public WideTable GetWideTable(string tableName, DBOpenType flag = DBOpenType.Opencreate, TableEnv tblEnv = null)
        {
            IntPtr _tblenv = tblEnv == null ? IntPtr.Zero : tblEnv.GetHandle();
            IntPtr _tbl    = BangDBNative.GetWideTable(_database, tableName, (int)flag, _tblenv);

            return((_tbl != IntPtr.Zero) ? new WideTable(tableName, _tbl) : null);
        }
Beispiel #3
0
 public SWTable(Database db, string tableName, TableEnv tenv, int ttlSec, bool archive)
 {
     _swTable = BangDBNative.CreateSWTable(db.GetHandle(), tableName, tenv.GetHandle(), ttlSec, archive ? 1 : 0);
 }
Beispiel #4
0
 public void AddIndex(string idxName, TableEnv tenv)
 {
     BangDBNative.AddIndexSWTable(_swTable, idxName, tenv.GetHandle());
 }
Beispiel #5
0
 public int AddIndex(string idxName, TableEnv tenv)
 {
     return(BangDBNative.AddIndex(_wtable, idxName, tenv.GetHandle()));
 }