akkadotnet / Akka.Persistence.Sql

Linq2Db implementation of Akka.Persistence.Sql. Common implementation for SQL Server, Sqlite, Postgres, Oracle, and MySql.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean up/consolidate Database Logic

to11mtm opened this issue · comments

commented

Because Linq2Db does not have the reactive stream capabilities that SlickDB has for JDBC side, We had to write some of our data access patterns differently. In the interests of getting a working product out we did not in all cases go with a 'consolidated' design where database access patterns are held in their own file, instead right now the various Journals and SnapshotStores are using Linq2Db directly.

It would not be a bad idea to consolidate this database logic into another class. Linq2Db thankfully has a lot of capabilities around syntactic sugar that make it easy to write composable functor-like classes.