-
Notifications
You must be signed in to change notification settings - Fork 1
DatabaseHandler Methods
Clears the current database handler. This causes the all internal properties to be set to default and the database xml files to be deleted.
public void ClearHandler();
Creates a database file of a type T that inherits from IDatabase.
- <type_parameter> T is a type that inherits from the Interface.IDatabase interface.
public void CreateDatabase<T>() where T : IDatabase;
Deletes a database file from the computer.
- <type_parameter> T is a type that inherits from the Interface.IDatabase interface.
public void DeleteDatabase<T>() where T : IDatabase;
Gets a selection of items that inherit from ICollectable object from their database collection.
- <type_parameter> T is a type that inherits from the Interface.ICollectableObjectinterface.
Returns all items of the selected type T in the database.
public ICollection<T> Get<T>() where T : ICollectableObject;
Gets a selection of items that inherit from ICollectable object from their database collection.
If propertyName and propertyValue are null, then returns all items of the selected type T in the database.
If propertyName and propertyValue are NOT null, then all items matching the query (propertyNames that have propertyValues as their value).
- <type_parameter> T is a type that inherits from the Interface.ICollectableObjectinterface.
- <method_parameter> propertyName = The name of a property defined in T
- <method_parameter> propertyValue = The value of a property named 'propertyName' and defined in T
Returns all items of the selected type T in the database matching the input parameters.
public ICollection<T> Get<T>(string propertyName, object propertyValue) where T : ICollectableObject;
Inserts a selection of items that inherit from ICollectable object in their database collection.
- <type_parameter> T is a type that inherits from the Interface.ICollectableObject interface.
- <method_parameter> items = A collection of items of type T.
public void Insert<T>(ICollection<T> items) where T : ICollectableObject;
Removes a selection of items that inherit from ICollectable object from their database collection.
- <type_parameter> T is a type that inherits from the Interface.ICollectableObject interface.
- <method_parameter> items = A collection of items of type T.
public void Remove<T>(ICollection<T> items) where T : ICollectableObject;
Saves a selection of items in its respective database.
- <type_parameter> T is a type that inherits from the Interface.ICollectableObject interface.
- <method_parameter> items = A collection of items of type T.
public void Save<T>(ICollection<T> items) where T : ICollectableObject;
Sets the workspace of this class. Type parameters must all inherit from IDatabase.
- <method_parameter> workspace = A path to a folder.
- <method_parameter> items = A collection of types.
public void SetWorkspace(string workspace, ICollection<Type> databaseTypes);
Sets the workspace of this class. Type parameters must all inherit from IDatabase.
- <method_parameter> fileToImport = A full path to a database file.
- <method_parameter> exportPath = A path to a folder.
public void ImportDatabase(string fileToImport, string exportPath);
Exports a group of database files to a single zipped file.
- <method_parameter> pathToSave = A folder where the database file will be created.
- <method_parameter> filename = A name for a new database file.
- <method_parameter> fileExtension = An extension for the database file.
public void ExportDatabase(string pathToSave, string filename, string fileExtension = ".db");
Updates a selection of items that inherit from ICollectable object in their database collection.
- <type_parameter> T is a type that inherits from the Interface.ICollectableObject interface.
- <method_parameter> items = A collection of items of type T.
public void Update<T>(ICollection<T> items) where T : ICollectableObject;