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
Attempt to implement an in-memory store using SQLite #147
Conversation
* prepered basic classes * copied ARC2_StoreTableManager to provide create table functions for SQLite instead
+ moved Adapter tests to tests/integration + removed further @'s before functions
because it fails local but not in CI
only failures left
to see why SQLite tests are failing
…ed values but not both
to avoid index access problems
the problem is that I can't reproduce the error locally.
problem was, it missed table prefix in some cases
We have an in-memory store now! 🚀 Added a small section to README.md about the new store: https://github.com/semsol/arc2/tree/pr/sqlite-in-memory-store#in-memory-store-sqlite-based @semsol (or should I use @bnowack from now on?): What do you think? I know there are many changes, but if you could take a look at SQLite related changes in |
@zozlak: What do you think about a standalone library providing an in-memory triple store? It could be based on this code here, using SQLite with |
I think there are many things to discuss here but I would be glad to talk with you about it. I propose you contact me by email not to spam here too much. |
Wow! how cool is that? |
What?
This PR contains code for an in-memory store which uses PDO + SQLite (
:memory:
). Because it is based on existing classes it provides the same functionality as its MySQL based pendant.I also extended PHP-CS-Fixer coverage and improved code readability overall.
Details
PDOAdapter
class got another check to make sure it is only used withmysql
protocol.ARC2_Store
to distinguish between MySQL and SQLite approachesARC2_StoreLoadQueryHandler::checkSQLBuffers
: removed fourth parameter, because it is unused inside the functionARC2_StoreSelectQueryHandler::getTempTableDef
: renamed it togetTempTableDefForMySQL
and added a second version for SQLite (calledgetTempTableDefForSQLite
)@
, e.g.@include_once
(suppressing errors is bad coding style because you might not see when something went wrong)Ref: #105