| Name | Description |
| AddCompositeIndex | Overloaded. Add a custom composite index. See the SterlingCompositeIndex in the example directory for an example implementation. |
| AddFullTextIndex<T> |
Add a full text index
|
| AddIndex | Overloaded. Add a custom index for a single property value. See the SterlingSingleIndex in the example directory for an example implementation. |
| Backup | Make a backup of all database files into a backup directory |
| BeginBulkOperation |
Begin a bulk operation in a transaction.
|
| BeginTransaction | Start a transaction to wrap a set of actions.
Do a CommitTransaction to permanantly save the actions.
Do a RollbackTranaction to undo all the actions in the transaction.
If the Phone or PC loses power during a transaction it will automatically be rolled back on OpenDatabase. |
| ClearLazyLoadedValues |
Clear All Lazy Loaded Values For All Indexes
|
| CloseDatabase | Close the database |
| CommitBulkOperation |
Commit a bulk operation in a transaction.
|
| CommitTransaction | Commit a transaction for a set of actions.
Do a BeginTransaction to start the transaction.
Do a RollbackTranaction to undo all the actions in the transaction.
If the Phone or PC loses power during a transaction it will automatically be rolled back on OpenDatabase. |
| CreateCompositeIndexQuery | Overloaded.
Query all index records for the specified composite property index
|
| CreateIndexQuery | Overloaded.
Query all index records for the specified single property index
|
| CreateObjectQuery<T> | Create a linq query based on the object type.
This performs a table scan returning only items that match the query.
Loading by the primary key is fastest, followed by CreateIndexQuery. |
| Delete | Overloaded. Delete a specific object from the database
The object must have a primary key property of Id or ObjectNameId as a type of long or an exception will be thrown.
Example primary key: CustomerId |
| DeleteBackup | Delete a backup set |
| DeleteEntireDatabase | Delete the entire database. This action cannot be undone. |
| Dispose |
Close the streams and release all resources
|
| DoesDatabaseExist | Returns true if the database exists that was specified in the constructor |
| ExportSchema | Export the current database schema. The definition is the C# class. |
| ExportTableToXml<T> | Export all records of a table to an XML string |
| Flush |
Flush buffered data from the index stream and the data stream (this is done automatically on close and commit transaction)
|
| GetIndex<T> |
Get an index by name
|
| GetNextPrimaryKeyValue<T> |
Get the next primary key that will be inserted for a type
|
| ImportTableFromXml<T> | Import records from an xml string to a table |
| IndexExists | Overloaded.
Returns true if the index exists for the passed in type and index name
|
| Load | Overloaded. Load an object from the database.
The object must have a primary key property of Id or ObjectNameId as a type of long or an exception will be thrown.
Example primary key: CustomerId
If there is nothing found, null is returned. |
| LoadAll<T> | Load the entire list of an object type from the database ordered by the primary key
Children and parents are not loaded.
To load children and parents do a LoadAllWithChildren
If there is nothing found, an empty list is returned. |
| LoadAllByIndex<T> |
Load All Items sorted by the specified index. Only records that match the index value will be loaded.
|
| LoadAllWithChildren<T> |
Load a list with all children populated
|
| LoadPage<T> |
Load a page of items ordered by the primary key
|
| LoadPageByIndex<T> |
Load a page of items, sorted by the specified index. Only records that match the index value will be loaded.
|
| LoadPageWithChildren<T> |
Load a page of objects with all children populated, ordered by the primary key
|
| LoadPartial<T> |
Load only the properties and fields specified. The format is the ClassName.PropertyName
Performance is not increased, the properties are simply not populated to be used for synchronization scenarios.
|
| LoadSchema | Load the Schema from the database |
| OpenDatabase | Open the database before performing any operation.
If the database does not exist it will automatically be created. |
| Pack | Reclaim the space from previously deleted and updated items |
| ReCalculateUnusedSpace |
Normally, unused space is aggresively recovered when items are deleted or items are updated and do not fit into the same space. This method is already called internally both inside and outside of transactions.
However, when using the BeginBulkOperation and CommitBulkOperation are used, unused space is not calculated. Call this method after a series of bulk operations.
|
| ReIndex<T> |
Reindex the passed in type.
|
| RemoveIndex<T> | Remove an index for the property of a type |
| Restore | Restore from a backup set to the current database |
| RollbackBulkOperation |
Undo a bulk operation in progress.
|
| RollbackTransaction | Undo all actions in a transaction.
Do a BeginTransaction to start the transaction.
Do a CommitTransaction to permanantly save the actions.
If the Phone or PC loses power during a transaction it will automatically be rolled back on OpenDatabase. |
| RowCount<T> | Count all objects of a specific type |
| Save | Overloaded. The entire object graph will be saved to the database in an implicit transaction.
If there is a problem saving any object, the implicit transation will be automatically rolled back.
To save child or parents seperately, define relationships as atributes.
The object must have a primary key property of Id or ObjectNameId as a type of long or an exception will be thrown.
Example primary keys: Id or CustomerId
If the primary is zero, the object will be inserted and set when it is saved.
If the primary key is greater than zero the object will be updated.
CreateDate, if defined will be filled in with the DateTime.Now during an insert
UpdateDate, if defined will be filled in with the DateTime.Now during an update. |
| SavePartial<T> |
Save only the specified fields or properties. The convention is ClassName.PropertyName
There is no performance benefit. The purpose is to be used in synchronization scenarios.
|
| SaveSchema |
Normally the schema file is automatically updated when a new type is added or removed. Use this method to immediately overwrite the schema file when adding or changing the encryption password.
|
| SearchAllKeywords<T> |
Search a full text index by all keywords
|
| SearchAnyKeywords<T> |
Search a full text index by any keywords
|
| SearchByRegex<T> |
Search a full text index by a regular expression
|
| SearchPhrase<T> |
Search a full text index by a phrase
|
| Truncate<T> | Delete all objects of a specific type |