Add compat package that register driver as sqlite3 #150
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.
As discussed in #88 external libraries like
ent
use thesqlite3
assqlite
driver. Thus, it is necessary that the driver is registered undersqlite3
.This PR adds a
compat
package that makes it possible to Register it as sqlite3 with a simple importOne basic problem is that the global driver is not exported, and the
RegisterDeterministicScalarFunction
acts on the global driver. Thus, some exported function that makes it possible to Register the global driver externally is needed.I solved this problem by a simple
RegisterAsSQLITE3
method. Thus, I believe there is little impact on the API definition.The only other way I am aware of to resolve this would be an internal package that contains the global driver and is imported on both points. However, this needs a larger refactor. Thus, I go with the simpler solution here.