/// <summary> /// Asynchronously determines database sizes /// </summary> /// <param name="db">Database instance to inspect</param> /// <returns>Awaitable Task of inspect operation</returns> public static Task GetInfoAsync(this DbInstance db) { return(TaskEx.Run(() => db.GetInfo())); }
/// <summary> /// Asynchronously compacts specified database instance /// </summary> /// <param name="db">Database instance to compact</param> /// <returns>Awaitable Task of compact operation</returns> public static Task CompactAsync(this DbInstance db) { return(TaskEx.Run(() => db.Compact())); }
/// <summary> /// Asynchronously purges specified database instance /// </summary> /// <param name="db">Database instance to purge</param> /// <returns>Awaitable Task of purge operation</returns> public static Task PurgeAsync(this DbInstance db) { return(TaskEx.Run(() => db.Purge())); }
/// <summary> /// Asynchronously executes write actions inside write transaction /// </summary> /// <param name="db">Database instance to write to</param> /// <param name="writes">Write operations to perform</param> /// <returns>Awaitable Task of write operations</returns> public static Task BulkWriteAsync(this DbInstance db, Action writes) { return(TaskEx.Run(() => db.BulkWrite(writes))); }
/// <summary> /// Asynchronously executes read actions inside read transaction /// </summary> /// <param name="db">Database instance to read from</param> /// <param name="reads">Read operations to perform</param> /// <returns>Awaitable Task of read operations</returns> public static Task BulkReadAsync(this DbInstance db, Action reads) { return(TaskEx.Run(() => db.BulkRead(reads))); }
/// <summary> /// Asynchronously initializes database instance /// </summary> /// <param name="db">Database instance to initialize</param> /// <returns>Awaitable Task of initialize operation</returns> public static Task InitializeAsync(this DbInstance db) { return(TaskEx.Run(() => db.Initialize())); }