Warning, this is a database designed for small tables, or in any case for applications without the need for large old records. Every operation goes through the static SpellBook class. The entities that the db uses must extend the Trick interface, which makes their primary key uniform with an unsigned long. Furthermore, at startup you must set the DatbaseName with the InitiationToArcane command, which together chooses other functions, such as logs, data position and the possibility of formatting the database in runtime. Although it is designed to have little data, the db saves a record every day it is used, allowing you to track old data deleted later. <<< Bonds >>> The database also provides bonds between entities of three types: mystics, evocations and twins. Mystics are one-to-many bonds, nullable or not, and allow you to throw exceptions if the many are created without a one, or the one wants to be deleted when there are many associated with it. Summons work the same way, but with two differences: many must necessarily have a link to one, so their field linked to the id of one cannot be nullable. Second, when one is deleted, all the summons associated with it are deleted in a cascade. Finally, twins are a one-to-one link. Nullable on one side or both. If it is linked on one side it is linked on both, allowing for quick exchanges of twins. If there is a non-nullable side, it throws an exception in any case you try to make it stay alone. To bind objects dynamically, instantiate, together with the bindings to decorators, also Scrolls of the bound type. <<< Jobs >>> The database allows you to set up parallel processes called spells. Spells can be cast and uncast, defining the time interval between one casting and another. Spells have a trigger tied to a type of object and every time an object hits it, an action starts with that object as input. By default MagicDatabase has some deletion spells, called DeathSpell, to delete objects when they meet a certain condition. <<< Transaction >>> Transactions are done with TimePortals. Using the NET keyword "using", you can create a block in which to do safe operations, which will be canceled in case of error. Remember to use AcceptChanges to apply the changes at the end of the block. <<< Index >>> A simple way to maintain a specific uniqueness constraint between objects of the same type. <<< Artifact >>> An extension of the Trick interface. Artifacts are objects that allow you to save, load and delete db elements directly by acting on them, simplifying their use. To report bugs or ask questions contact marvin.sincini@studenti.unicam.it An example of the use of the MagicDatabase can be found at the following link: https://github.com/Sassas98/DataServiceExample
$ dotnet add package MagicDatabaseWarning, this is a database designed for small tables, or in any case for applications without the need for large old records. Every operation goes through the static SpellBook class. The entities that the db uses must extend the Trick interface, which makes their primary key uniform with an unsigned long. Furthermore, at startup you must set the DatbaseName with the InitiationToArcane command, which together chooses other functions, such as logs, data position and the possibility of formatting the database in runtime. Although it is designed to have little data, the db saves a record every day it is used, allowing you to track old data deleted later.
<<< Bonds >>> The database also provides bonds between entities of three types: mystics, evocations and twins. Mystics are one-to-many bonds, nullable or not, and allow you to throw exceptions if the many are created without a one, or the one wants to be deleted when there are many associated with it. Summons work the same way, but with two differences: many must necessarily have a link to one, so their field linked to the id of one cannot be nullable. Second, when one is deleted, all the summons associated with it are deleted in a cascade. Finally, twins are a one-to-one link. Nullable on one side or both. If it is linked on one side it is linked on both, allowing for quick exchanges of twins. If there is a non-nullable side, it throws an exception in any case you try to make it stay alone. To bind objects dynamically, instantiate, together with the bindings to decorators, also Scrolls of the bound type.
<<< Jobs >>> The database allows you to set up parallel processes called spells. Spells can be cast and uncast, defining the time interval between one casting and another. Spells have a trigger tied to a type of object and every time an object hits it, an action starts with that object as input. By default MagicDatabase has some deletion spells, called DeathSpell, to delete objects when they meet a certain condition.
<<< Transaction >>> Transactions are done with TimePortals. Using the NET keyword "using", you can create a block in which to do safe operations, which will be canceled in case of error. Remember to use AcceptChanges to apply the changes at the end of the block.
<<< Index >>> A simple way to maintain a specific uniqueness constraint between objects of the same type.
<<< Artifact >>> An extension of the Trick interface. Artifacts are objects that allow you to save, load and delete db elements directly by acting on them, simplifying their use.
To report bugs or ask questions contact marvin.sincini@studenti.unicam.it An example of the use of the MagicDatabase can be found at the following link: https://github.com/Sassas98/DataServiceExample