Convert Edk2DB to use an ORM instead of sqlite3 directly #485
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Edk2DB has a high barrier to entry as users must not only know how to write and work with sqlite3 databases, but also spend the time to understand the schema of the EDK2DB database, which can change depending on user's needs. These changes occur because users can choose to register only a subset of provided parsers, and create their table parsers, which can result in a drastically different database implementation. This change switches database functionality to be managed through an ORM (specifically https://www.sqlalchemy.org/) to abstract away the need to know the inner workings of the database.
This change should greatly reduce the barrier to entry for users that want to utilize this functionality. They only need to learn the simple interface for writing ORM queries (Through the ORM Querying Guide), then they will be able to work with the database tables as if they were traditional python objects.
This change does the following:
edk2toollib.database
which represent tables in the database