public DatabaseConfig(DbFlags flags, CompareFunction compareFunc = null, CompareFunction dupSortFunc = null) { OpenFlags = flags; CompareFunction = compareFunc; DupSortFunction = dupSortFunc; }
public static extern int mdb_dbi_open(IntPtr txn, string name, DbFlags flags, out uint db);
private void InitFlags() { DbFlags initFlags = DbFlags.None; if (dbFlagCollection == null) { return; } foreach (DatabaseFlags flag in dbFlagCollection) { switch (flag) { case DatabaseFlags.None: initFlags |= DbFlags.None; break; case DatabaseFlags.ChkSum: initFlags |= DbFlags.ChkSum; break; case DatabaseFlags.Dup: initFlags |= DbFlags.Dup; break; case DatabaseFlags.DupSort: initFlags |= DbFlags.DupSort; break; case DatabaseFlags.Encrypt: initFlags |= DbFlags.Encrypt; break; case DatabaseFlags.InOrder: initFlags |= DbFlags.InOrder; break; case DatabaseFlags.RecNum: initFlags |= DbFlags.RecNum; break; case DatabaseFlags.Renumber: initFlags |= DbFlags.Renumber; break; case DatabaseFlags.RevSplitOff: initFlags |= DbFlags.RevSplitOff; break; case DatabaseFlags.Snapshot: initFlags |= DbFlags.Snapshot; break; case DatabaseFlags.TxnNotDurable: initFlags |= DbFlags.TxnNotDurable; break; default: throw new ApplicationException("Unknown DB Flag '" + flag + "'"); } flags = initFlags; } }