-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL data store #150
Comments
This comment has been minimized.
This comment has been minimized.
As of beta-5 we have ; Database driver to use, currently only 'json' is supported
db_driver = json
; Data Source Name, the information required to connect to the database
; Values are driver specific
db_dsn = "%base_dir%/data" |
There is now a set of interfaces defining the database layer. Implement these interfaces to add new database drivers. See the Db namespace. Also see the Json driver for an example. Implementation agnostic tests are in DonorRepositorySpecTrait and ImportHistorySpecTrait. (See the json testsuite for reference.) Also note that database drivers can be written as plugins using something like use byrokrat\giroapp\Plugin\PluginInterface;
use byrokrat\giroapp\Plugin\EnvironmentInterface;
return new class implements PluginInterface {
public function loadPlugin(EnvironmentInterface $env): void
{
$env->registerDatabaseDriver(new MyCustomDatabaseDriverFactory);
}
}; |
The json thing is good during development. As it is easy to inspect. But someting faster is needed in the future. Should probably be a choice between SQLite and MySQL..
The text was updated successfully, but these errors were encountered: