Beispiel #1
0
        public BDBStore(string directory)
        {
            if (!Directory.Exists(directory))
                Directory.CreateDirectory(directory);

            env = new BDB43.Env(directory);

            bool create = true;
            db_id_to_value = new BDB43("id_to_value", create, DBFormat.Hash, false, env);
            db_value_to_id = new BDB43("value_to_id", create, DBFormat.Hash, false, env);
            db_statements_index = new BDB43("statements_index", create, DBFormat.Hash, false, env);

            db_id_to_value.KeyType = BDB.DataType.UInt;
            db_id_to_value.ValueType = BDB.DataType.String;
            db_value_to_id.KeyType = BDB.DataType.String;
            db_value_to_id.ValueType = BDB.DataType.UInt;
            db_statements_index.KeyType = BDB.DataType.UInt;
            db_statements_index.ValueType = BDB.DataType.IntArray;
        }
Beispiel #2
0
			internal Cursor(BDB43 parent, IntPtr cursorp) {
				this.cursorp = cursorp;
				this.parent = parent;
				funcs = (cursorstruct)Marshal.PtrToStructure((IntPtr)((int)cursorp+188), typeof(cursorstruct));
			}
Beispiel #3
0
 internal Cursor(BDB43 parent, IntPtr cursorp)
 {
     this.cursorp = cursorp;
     this.parent  = parent;
     funcs        = (cursorstruct)Marshal.PtrToStructure((IntPtr)((int)cursorp + 188), typeof(cursorstruct));
 }