Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement SQL lite storage (#72)
* feat: initial scaffolding * feat: insert implementation * feat: change column types based on the SQL lite supported types * feat: changed schema, first version of CRUD operations implementation * refactor: extract common parts to helper functions * chore: add comments * fix: linter config warning * refactor: simplify in-memory storage and fix deadlocks in case of errors * feat: instantiate either in memory or sql storage * chore: add comment * test: fully covered memstorage feat minor renames * feat: add github.com/mattn/go-sqlite3 as direct dependency * fix: adapt the DB schema, fix issues and add unit tests for sql storage * feat: increase coverage * test: add some more unit tests * fix: group variables * refactor: rename PersistenceFilename config parameter * fix: rename helper function (address comment part 1) * feat: introduce meddler * chore: remove useless comments * fix: revert update logic to manually constructing SQL and address comments from @joanestebanr (part 1) * fix: change some columns types (address comment from @joanestebanr 2nd part) * fix: use meddler to construct on fly update statement, address comments from @joanestebanr (part 3) * feat: remove in memory storage, change block_number to BIGINT (address @joanestebanr part 4) * fix: remove redundant code * feat: simplify building of UPDATE clause * rebase fix * refactor: build base select and base delete statement dynamically (address comment from @arnaubennassar) * test: concurrent write to the database unit test --------- Co-authored-by: Goran Rojovic <[email protected]>
- Loading branch information