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>>(Array.Empty<T>());
87 public Task<IEnumerable<T>>
Find<T>(
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
90 return Task.FromResult<IEnumerable<T>>(Array.Empty<T>());
102 public Task<IEnumerable<object>>
Find(
string Collection,
int Offset,
int MaxCount, params
string[] SortOrder)
104 return Task.FromResult<IEnumerable<object>>(Array.Empty<
object>());
117 public Task<IEnumerable<object>>
Find(
string Collection,
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
119 return Task.FromResult<IEnumerable<object>>(Array.Empty<
object>());
133 public Task<IEnumerable<T>>
Find<T>(
string Collection,
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
136 return Task.FromResult<IEnumerable<T>>(Array.Empty<T>());
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)
247 return Task.FromResult(
false);
266 return Task.FromResult(
false);
281 params
string[] SortOrder)
283 return Task.FromResult(
false);
301 return Task.FromResult(
false);
320 return Task.FromResult(
false);
327 public Task
Update(
object Object) => Task.CompletedTask;
333 public Task
Update(params
object[] Objects) => Task.CompletedTask;
339 public Task
Update(IEnumerable<object> Objects) => Task.CompletedTask;
366 public Task
Delete(
object Object) => Task.CompletedTask;
372 public Task
Delete(params
object[] Objects) => Task.CompletedTask;
378 public Task
Delete(IEnumerable<object> Objects) => Task.CompletedTask;
410 public Task<IEnumerable<T>>
FindDelete<T>(
int Offset,
int MaxCount, params
string[] SortOrder)
413 return Task.FromResult<IEnumerable<T>>(Array.Empty<T>());
429 return Task.FromResult<IEnumerable<T>>(Array.Empty<T>());
441 public Task<IEnumerable<object>>
FindDelete(
string Collection,
int Offset,
int MaxCount, params
string[] SortOrder)
443 return Task.FromResult<IEnumerable<object>>(Array.Empty<
object>());
456 public Task<IEnumerable<object>>
FindDelete(
string Collection,
int Offset,
int MaxCount,
Filter Filter, params
string[] SortOrder)
458 return Task.FromResult<IEnumerable<object>>(Array.Empty<
object>());
471 where T :
class => Task.CompletedTask;
483 public Task DeleteLazy<T>(
int Offset,
int MaxCount,
Filter Filter,
string[] SortOrder, ObjectsCallback Callback)
484 where T :
class => Task.CompletedTask;
495 public Task
DeleteLazy(
string Collection,
int Offset,
int MaxCount,
string[] SortOrder, ObjectsCallback Callback) => Task.CompletedTask;
507 public Task
DeleteLazy(
string Collection,
int Offset,
int MaxCount,
Filter Filter,
string[] SortOrder, ObjectsCallback Callback) => Task.CompletedTask;
515 public Task<T> TryLoadObject<T>(
object ObjectId)
528 public Task<T> TryLoadObject<T>(
string CollectionName,
object ObjectId)
572 return Task.CompletedTask;
586 return Task.CompletedTask;
594 public Task
Clear(
string CollectionName) => Task.CompletedTask;
604 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData)
606 return Task.FromResult(Array.Empty<
string>());
618 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
ProfilerThread Thread)
620 return Task.FromResult(Array.Empty<
string>());
631 public Task<string[]>
Repair(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData)
633 return Task.FromResult(Array.Empty<
string>());
645 public Task<string[]>
Repair(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
ProfilerThread Thread)
647 return Task.FromResult(Array.Empty<
string>());
659 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
bool Repair)
661 return Task.FromResult(Array.Empty<
string>());
674 public Task<string[]>
Analyze(XmlWriter Output,
string XsltPath,
string ProgramDataFolder,
bool ExportData,
bool Repair,
ProfilerThread Thread)
676 return Task.FromResult(Array.Empty<
string>());
684 public Task<string[]>
Repair(params
string[] CollectionNames)
686 return Task.FromResult(Array.Empty<
string>());
697 return Task.FromResult(Array.Empty<
string>());
706 public Task
AddIndex(
string CollectionName,
string[] FieldNames) => Task.CompletedTask;
714 public Task
RemoveIndex(
string CollectionName,
string[] FieldNames) => Task.CompletedTask;
723 public Task<string[][]>
GetIndices(
string CollectionName) => Task.FromResult(
new string[0][]);
738 public Task
Start() => Task.CompletedTask;
743 public Task
Stop() => Task.CompletedTask;
748 public Task
Flush() => Task.CompletedTask;
753 public int ObjectIdByteCount => 0;
760 public Task<IPersistentDictionary>
GetDictionary(
string Collection) =>
throw new InvalidOperationException(
"Server is shutting down.");
774 public Task<IPersistedQueue>
GetQueue(
string QueueName,
bool CanBeNull) =>
775 throw new InvalidOperationException(
"Server is shutting down.");
781 public Task<string[]>
GetQueues() => Task.FromResult(Array.Empty<
string>());
789 return Task.FromResult(Array.Empty<
string>());
799 return Task.FromResult(
string.Empty);
809 return Task.FromResult(
string.Empty);
819 public Task<bool>
IsLabel(
string Collection,
string Label)
821 return Task.FromResult(
false);
830 return Task.FromResult(Array.Empty<
string>());
840 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< bool > Process(IProcessor< object > Processor, string Collection, int Offset, int MaxCount, Filter Filter, params string[] SortOrder)
Processes untyped objects.
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< IPersistedQueue > GetQueue(string QueueName, bool CanBeNull)
Gets a persistent dictionary containing objects in a collection.
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< string[]> GetQueues()
Gets an array of available queue names.
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< bool > Process(IProcessor< object > Processor, string Collection, int Offset, int MaxCount, params string[] SortOrder)
Processes untyped objects.
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< bool > Process< T >(IProcessor< T > Processor, int Offset, int MaxCount, params string[] SortOrder)
Processes objects of a given class T .
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< string[][]> GetIndices(string CollectionName)
Removes an index from a collection, if one exist.
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 processors of objects.
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.