コード例 #1
0
ファイル: BaseDatabase.cs プロジェクト: gildafnai82/craq
 /// <summary>
 /// Create a new database object with the same underlying DB handle as
 /// <paramref name="clone"/>.  Used during Database.Open to get an
 /// object of the correct DBTYPE.
 /// </summary>
 /// <param name="clone">Database to clone</param>
 protected BaseDatabase(BaseDatabase clone) {
     db = clone.db;
     clone.db = null;
     db.api_internal = this;
     env = clone.env;
     clone.env = null;
 }
コード例 #2
0
ファイル: Database.cs プロジェクト: simonzhangsm/h-store
 /// <summary>
 /// Create a new database object with the same underlying DB handle as
 /// <paramref name="clone"/>.  Used during Database.Open to get an
 /// object of the correct DBTYPE.
 /// </summary>
 /// <param name="clone">Database to clone</param>
 protected Database(BaseDatabase clone)
     : base(clone)
 {
 }
コード例 #3
0
ファイル: HeapDatabase.cs プロジェクト: mcandre/db
 internal HeapDatabase(BaseDatabase clone)
     : base(clone)
 {
 }
コード例 #4
0
 internal RecnoDatabase(BaseDatabase clone)
     : base(clone)
 {
 }
コード例 #5
0
ファイル: BTreeDatabase.cs プロジェクト: mcandre/db
 internal BTreeDatabase(BaseDatabase clone)
     : base(clone)
 {
 }
コード例 #6
0
 /// <summary>
 /// Rename the database specified by <paramref name="Filename"/> and
 /// <paramref name="DatabaseName"/>.
 /// </summary>
 /// <overloads>
 /// <para>
 /// Applications should not rename databases that are currently in use.
 /// If an underlying file is being renamed and logging is currently
 /// enabled in the database environment, no database in the file may be
 /// open when Rename is called. In particular, some architectures do not
 /// permit renaming files with open handles. On these architectures,
 /// attempts to rename databases that are currently in use by any thread
 /// of control in the system may fail. 
 /// </para>
 /// <para>
 /// Rename should not be called if the rename is intended to be
 /// transactionally safe;
 /// <see cref="DatabaseEnvironment.RenameDB"/> should be
 /// used instead. 
 /// </para>
 /// </overloads>
 /// <param name="Filename">The file to rename</param>
 /// <param name="DatabaseName">The database to rename</param>
 /// <param name="NewName">The new database name</param>
 /// <param name="DbEnv">
 /// The DatabaseEnvironment the database belongs to
 /// </param>
 public static void Rename(string Filename,
     string DatabaseName, string NewName, DatabaseEnvironment DbEnv)
 {
     BaseDatabase db = new BaseDatabase(DbEnv, 0);
     db.db.rename(Filename, DatabaseName, NewName, 0);
 }
コード例 #7
0
 /// <summary>
 /// Protected factory method to create and open a new database object.
 /// </summary>
 /// <param name="Filename">The database's filename</param>
 /// <param name="DatabaseName">The subdatabase's name</param>
 /// <param name="cfg">The database's configuration</param>
 /// <param name="txn">
 /// The transaction in which to open the database
 /// </param>
 /// <returns>A new, open database object</returns>
 protected static BaseDatabase Open(string Filename,
     string DatabaseName, DatabaseConfig cfg, Transaction txn)
 {
     BaseDatabase ret = new BaseDatabase(cfg.Env, 0);
     ret.Config(cfg);
     ret.db.open(Transaction.getDB_TXN(txn),
         Filename, DatabaseName, DBTYPE.DB_UNKNOWN, cfg.openFlags, 0);
     return ret;
 }
コード例 #8
0
ファイル: HashDatabase.cs プロジェクト: jamiekeefer/gldcoin
 internal HashDatabase(BaseDatabase clone)
     : base(clone)
 {
 }
コード例 #9
0
 internal QueueDatabase(BaseDatabase clone)
     : base(clone)
 {
 }