2using System.Collections.Generic;
3using System.Threading.Tasks;
27 public Task
Insert(
object Object) => Task.CompletedTask;
33 public Task
Insert(params
object[] Objects) => Task.CompletedTask;
39 public Task
Insert(IEnumerable<object> Objects) => Task.CompletedTask;
71 public Task<IEnumerable<T>>
Find<T>(
int Offset,
int MaxCount, params
string[] SortOrder)
74 return Task.FromResult<IEnumerable<T>>(
new T[0]);
87 public Task<IEnumerable<T>>
Find<T>(
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
90 return Task.FromResult<IEnumerable<T>>(
new T[0]);
102 public Task<IEnumerable<object>>
Find(
string Collection,
int Offset,
int MaxCount, params
string[] SortOrder)
104 return Task.FromResult<IEnumerable<object>>(
new object[0]);
117 public Task<IEnumerable<object>>
Find(
string Collection,
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
119 return Task.FromResult<IEnumerable<object>>(
new object[0]);
133 public Task<IEnumerable<T>>
Find<T>(
string Collection,
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
136 return Task.FromResult<IEnumerable<T>>(
new T[0]);
147 public Task<IPage<T>>
FindFirst<T>(
int PageSize, params
string[] SortOrder)
176 public Task<IPage<object>>
FindFirst(
string Collection,
int PageSize, params
string[] SortOrder)
237 public Task
Update(
object Object) => Task.CompletedTask;
243 public Task
Update(params
object[] Objects) => Task.CompletedTask;
249 public Task
Update(IEnumerable<object> Objects) => Task.CompletedTask;
276 public Task
Delete(
object Object) => Task.CompletedTask;
282 public Task
Delete(params
object[] Objects) => Task.CompletedTask;
288 public Task
Delete(IEnumerable<object> Objects) => Task.CompletedTask;
320 public Task<IEnumerable<T>>
FindDelete<T>(
int Offset,
int MaxCount, params
string[] SortOrder)
323 return Task.FromResult<IEnumerable<T>>(
new T[0]);
339 return Task.FromResult<IEnumerable<T>>(
new T[0]);
351 public Task<IEnumerable<object>>
FindDelete(
string Collection,
int Offset,
int MaxCount, params
string[] SortOrder)
353 return Task.FromResult<IEnumerable<object>>(
new object[0]);
366 public Task<IEnumerable<object>>
FindDelete(
string Collection,
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
368 return Task.FromResult<IEnumerable<object>>(
new object[0]);
381 where T :
class => Task.CompletedTask;
393 public Task DeleteLazy<T>(
int Offset,
int MaxCount,
Filter Filter,
string[] SortOrder, ObjectsCallback Callback)
394 where T :
class => Task.CompletedTask;
405 public Task
DeleteLazy(
string Collection,
int Offset,
int MaxCount,
string[] SortOrder, ObjectsCallback Callback) => Task.CompletedTask;
417 public Task
DeleteLazy(
string Collection,
int Offset,
int MaxCount,
Filter Filter,
string[] SortOrder, ObjectsCallback Callback) => Task.CompletedTask;
425 public Task<T> TryLoadObject<T>(
object ObjectId)
438 public Task<T> TryLoadObject<T>(
string CollectionName,
object ObjectId)
482 return Task.CompletedTask;
496 return Task.CompletedTask;
504 public Task
Clear(
string CollectionName) => Task.CompletedTask;
514 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData)
516 return Task.FromResult(
new string[0]);
528 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
ProfilerThread Thread)
530 return Task.FromResult(
new string[0]);
541 public Task<string[]>
Repair(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData)
543 return Task.FromResult(
new string[0]);
555 public Task<string[]>
Repair(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
ProfilerThread Thread)
557 return Task.FromResult(
new string[0]);
569 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
bool Repair)
571 return Task.FromResult(
new string[0]);
584 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
bool Repair,
ProfilerThread Thread)
586 return Task.FromResult(
new string[0]);
594 public Task<string[]>
Repair(params
string[] CollectionNames)
596 return Task.FromResult(
new string[0]);
607 return Task.FromResult(
new string[0]);
616 public Task
AddIndex(
string CollectionName,
string[] FieldNames) => Task.CompletedTask;
624 public Task
RemoveIndex(
string CollectionName,
string[] FieldNames) => Task.CompletedTask;
639 public Task
Start() => Task.CompletedTask;
644 public Task
Stop() => Task.CompletedTask;
649 public Task
Flush() => Task.CompletedTask;
654 public int ObjectIdByteCount => 0;
661 public Task<IPersistentDictionary>
GetDictionary(
string Collection) =>
throw new InvalidOperationException(
"Server is shutting down.");
675 return Task.FromResult(
new string[0]);
685 return Task.FromResult(
string.Empty);
695 return Task.FromResult(
string.Empty);
705 public Task<bool>
IsLabel(
string Collection,
string Label)
707 return Task.FromResult(
false);
716 return Task.FromResult(
new string[0]);
726 return Task.FromResult<
object>(
null);
Represents an empty page of items.
Base class for all filter classes.
Task< string[]> GetLabels(string Collection)
Gets an array of available labels for a collection.
Task Delete(params object[] Objects)
Deletes a collection of objects in the database.
string[] GetExcludedCollections()
Gets an array of collections that should be excluded from backups.
Task Flush()
Persists any pending changes.
Task< object > TryLoadObject(string CollectionName, object ObjectId)
Tries to load an object given its Object ID ObjectId and its collection name CollectionName .
Task Insert(object Object)
Inserts an object into the database.
Task DeleteLazy(string Collection, int Offset, int MaxCount, string[] SortOrder, ObjectsCallback Callback)
Finds objects in a given collection and deletes them in the same atomic operation.
Task< IEnumerable< T > > Find< T >(int Offset, int MaxCount, params string[] SortOrder)
Finds objects of a given class T .
Task< IPage< object > > FindNext(IPage< object > Page)
Finds the next page of objects in a given collection.
Task< string[]> Analyze(XmlWriter Output, string XsltPath, string ProgramDataFolder, bool ExportData, bool Repair, ProfilerThread Thread)
Analyzes the database and exports findings to XML.
Task< IEnumerable< object > > Find(string Collection, int Offset, int MaxCount, params string[] SortOrder)
Finds objects in a given collection.
Task Update(IEnumerable< object > Objects)
Updates a collection of objects in the database.
Task DeleteLazy(object[] Objects, ObjectsCallback Callback)
Deletes a collection of objects in the database, if unlocked. If locked, objects will be deleted at n...
Task< bool > Export(IDatabaseExport Output, string[] CollectionNames)
Performs an export of the database.
Task< IEnumerable< object > > FindDelete(string Collection, int Offset, int MaxCount, params string[] SortOrder)
Finds objects in a given collection and deletes them in the same atomic operation.
Task Insert(IEnumerable< object > Objects)
Inserts a collection of objects into the database.
Task DeleteLazy(IEnumerable< object > Objects, ObjectsCallback Callback)
Deletes a collection of objects in the database, if unlocked. If locked, objects will be deleted at n...
Task DeleteLazy(string Collection, int Offset, int MaxCount, Filter Filter, string[] SortOrder, ObjectsCallback Callback)
Finds objects in a given collection and deletes them in the same atomic operation.
Task< IPage< object > > FindFirst(string Collection, int PageSize, params string[] SortOrder)
Finds the first page of objects in a given collection.
Task< string[]> Repair(ProfilerThread Thread, params string[] CollectionNames)
Repairs a set of collections.
Task< IEnumerable< T > > FindDelete< T >(int Offset, int MaxCount, params string[] SortOrder)
Finds objects of a given class T and deletes them in the same atomic operation.
Task< IPage< T > > FindNext< T >(IPage< T > Page)
Finds the next page of objects of a given class T .
Task Clear(string CollectionName)
Clears a collection of all objects.
Task InsertLazy(object[] Objects, ObjectsCallback Callback)
Inserts an object into the database, if unlocked. If locked, object will be inserted at next opportun...
Task Start()
Called when processing starts.
Task EndBulk()
Ends bulk-processing of data. Must be called once for every call to StartBulk.
Task AddIndex(string CollectionName, string[] FieldNames)
Adds an index to a collection, if one does not already exist.
Task< IEnumerable< object > > Find(string Collection, int Offset, int MaxCount, Filter Filter, params string[] SortOrder)
Finds objects in a given collection.
Task< string[]> Repair(params string[] CollectionNames)
Repairs a set of collections.
Task Update(object Object)
Updates an object in the database.
Task Update(params object[] Objects)
Updates a collection of objects in the database.
Task< IPersistentDictionary > GetDictionary(string Collection)
Gets a persistent dictionary containing objects in a collection.
Task Delete(IEnumerable< object > Objects)
Deletes a collection of objects in the database.
Task< string > GetCollection(Object Object)
Gets the collection corresponding to a given object.
Task< GenericObject > Generalize(object Object)
Creates a generalized representation of an object.
Task StartBulk()
Starts bulk-proccessing of data. Must be followed by a call to EndBulk.
Task UpdateLazy(object[] Objects, ObjectsCallback Callback)
Updates a collection of objects in the database, if unlocked. If locked, objects will be updated at n...
Task< string[]> Analyze(XmlWriter Output, string XsltPath, string ProgramDataFolder, bool ExportData, ProfilerThread Thread)
Analyzes the database and exports findings to XML.
Task< IPage< object > > FindFirst(string Collection, int PageSize, Filter Filter, params string[] SortOrder)
Finds the first page of objects in a given collection.
Task UpdateLazy(IEnumerable< object > Objects, ObjectsCallback Callback)
Updates a collection of objects in the database, if unlocked. If locked, objects will be updated at n...
Task DeleteLazy< T >(int Offset, int MaxCount, string[] SortOrder, ObjectsCallback Callback)
Finds objects of a given class T and deletes them in the same atomic operation.
Task< string > GetCollection(Type Type)
Gets the collection corresponding to a given type.
Task RemoveIndex(string CollectionName, string[] FieldNames)
Removes an index from a collection, if one exist.
Task< bool > Export(IDatabaseExport Output, string[] CollectionNames, ProfilerThread Thread)
Performs an export of the database.
Task Delete(object Object)
Deletes an object in the database.
Task DropCollection(string CollectionName)
Drops a collection, if it exist.
Task< IPage< T > > FindFirst< T >(int PageSize, params string[] SortOrder)
Finds the first page of objects of a given class T .
Task Insert(params object[] Objects)
Inserts a collection of objects into the database.
NullDatabaseProvider()
A NULL database.
Task< object > TryGetObjectId(object Object)
Tries to get the Object ID of an object, if it exists.
Task< string[]> Analyze(XmlWriter Output, string XsltPath, string ProgramDataFolder, bool ExportData)
Analyzes the database and exports findings to XML.
Task InsertLazy(object Object, ObjectCallback Callback)
Inserts an object into the database, if unlocked. If locked, object will be inserted at next opportun...
Task< string[]> Analyze(XmlWriter Output, string XsltPath, string ProgramDataFolder, bool ExportData, bool Repair)
Analyzes the database and exports findings to XML.
Task< string[]> GetDictionaries()
Gets an array of available dictionary collections.
Task< string[]> GetCollections()
Gets an array of available collections.
Task UpdateLazy(object Object, ObjectCallback Callback)
Updates an object in the database, if unlocked. If locked, object will be updated at next opportunity...
Task< IEnumerable< object > > FindDelete(string Collection, int Offset, int MaxCount, Filter Filter, params string[] SortOrder)
Finds objects in a given collection and deletes them in the same atomic operation.
Task< string[]> Repair(XmlWriter Output, string XsltPath, string ProgramDataFolder, bool ExportData)
Analyzes the database and repairs it if necessary. Results are exported to XML.
Task< object > Specialize(GenericObject Object)
Creates a specialized representation of a generic object.
Task DeleteLazy(object Object, ObjectCallback Callback)
Deletes an object in the database, if unlocked. If locked, object will be deleted at next opportunity...
Task< bool > IsLabel(string Collection, string Label)
Checks if a string is a label in a given collection.
Task InsertLazy(IEnumerable< object > Objects, ObjectsCallback Callback)
Inserts an object into the database, if unlocked. If locked, object will be inserted at next opportun...
Task< string[]> Repair(XmlWriter Output, string XsltPath, string ProgramDataFolder, bool ExportData, ProfilerThread Thread)
Analyzes the database and repairs it if necessary. Results are exported to XML.
Task Stop()
Called when processing ends.
Generic object. Contains a sequence of properties.
Class that keeps track of events and timing for one thread.
Interface for database providers that can be plugged into the static Database class.
Interface for paginated results.
Interface for database exports.
Interface for iterations of database contents.
delegate void ObjectCallback(object Object)
Method called when a process has completed for an object.
delegate void ObjectsCallback(IEnumerable< object > Objects)
Method called when a process has completed for a set of objects.