Lite |
public class LiteEngine : ILiteEngine, IDisposable
The LiteEngine type exposes the following members.
| Name | Description | |
|---|---|---|
| LiteEngine | Initialize LiteEngine using connection memory database | |
| LiteEngine(EngineSettings) | Initialize LiteEngine using initial engine settings | |
| LiteEngine(String) | Initialize LiteEngine using connection string using key=value; parser |
| Name | Description | |
|---|---|---|
| BeginTrans | Initialize a new transaction. Transaction are created "per-thread". There is only one single transaction per thread. Return true if transaction was created or false if current thread already in a transaction. | |
| Checkpoint | Run checkpoint command to copy log file into data file | |
| Commit | Persist all dirty pages into LOG file | |
| Delete | Implements delete based on IDs enumerable | |
| DeleteMany | Implements delete based on filter expression | |
| Dispose | Releases all resources used by the LiteEngine | |
| Dispose(Boolean) | Releases the unmanaged resources used by the LiteEngine and optionally releases the managed resources | |
| DropCollection | Drop collection including all documents, indexes and extended pages (do not support transactions) | |
| DropIndex | Drop an index from a collection | |
| EnsureIndex | Create a new index (or do nothing if already exists) to a collection/field | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetCollectionNames | Returns all collection inside datafile | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| Insert | Insert all documents in collection. If document has no _id, use AutoId generation. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| Pragma(String) | Get engine internal pragma value | |
| Pragma(String, BsonValue) | Set engine pragma new value (some pragmas will be affected only after realod) | |
| Query | Run query over collection using a query definition. Returns a new IBsonDataReader that run and return first document result (open transaction) | |
| Rebuild | Implement a full rebuild database. A backup copy will be created with -backup extention. All data will be readed and re created in another database | |
| Rebuild(RebuildOptions) | Implement a full rebuild database. Engine will be closed and re-created in another instance. A backup copy will be created with -backup extention. All data will be readed and re created in another database After run, will re-open database | |
| RenameCollection | Rename a collection (do not support transactions) | |
| Rollback | Do rollback to current transaction. Clear dirty pages in memory and return new pages to main empty linked-list | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| Update | Implement update command to a document inside a collection. Return number of documents updated | |
| UpdateMany | Update documents using transform expression (must return a scalar/document value) using predicate as filter | |
| Upgrade |
Upgrade old version of LiteDB into new LiteDB file structure. Returns true if database was completed converted
If database already in current version just return false
Obsolete | |
| Upsert | Implement upsert command to documents in a collection. Calls update on all documents, then any documents not updated are then attempted to insert. This will have the side effect of throwing if duplicate items are attempted to be inserted. |
| Name | Description | |
|---|---|---|
| MethodInvoke |
Calls the object method by name.
(Defined by ObjectEx) | |
| PropertyGet |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertyGetT |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertySet |
Sets the value of the object property by name.
(Defined by ObjectEx) |