コード例 #1
0
ファイル: ExampleTest.cs プロジェクト: raihansazal/LiteDB
        /// <summary>
        /// Use this method to initialize your stress test.
        /// You can drop existing collection, load initial data and run checkpoint before finish
        /// </summary>
        public override void OnInit(SqlDB db)
        {
            db.ExecuteScalar("DROP COLLECTION col1");

            db.Insert("col1", new BsonDocument
            {
                ["_id"]  = 1,
                ["name"] = "John"
            });

            db.ExecuteScalar("CHECKPOINT");
        }
コード例 #2
0
 public void Delete_Active(SqlDB db)
 {
     db.ExecuteScalar("DELETE col1 WHERE active = true");
 }
コード例 #3
0
 public void Update_Active(SqlDB db)
 {
     db.ExecuteScalar("UPDATE col1 SET active = true, r = null WHERE active = false");
 }