forked from litedb-org/LiteDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ILiteEngine.cs
33 lines (26 loc) · 1.15 KB
/
ILiteEngine.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
namespace LiteDB.Engine
{
public interface ILiteEngine : IDisposable
{
int Checkpoint();
long Rebuild(RebuildOptions options);
bool BeginTrans();
bool Commit();
bool Rollback();
IBsonDataReader Query(string collection, Query query);
int Insert(string collection, IEnumerable<BsonDocument> docs, BsonAutoId autoId);
int Update(string collection, IEnumerable<BsonDocument> docs);
int UpdateMany(string collection, BsonExpression transform, BsonExpression predicate);
int Upsert(string collection, IEnumerable<BsonDocument> docs, BsonAutoId autoId);
int Delete(string collection, IEnumerable<BsonValue> ids);
int DeleteMany(string collection, BsonExpression predicate);
bool DropCollection(string name);
bool RenameCollection(string name, string newName);
bool EnsureIndex(string collection, string name, BsonExpression expression, bool unique);
bool DropIndex(string collection, string name);
BsonValue Pragma(string name);
bool Pragma(string name, BsonValue value);
}
}