AE
Ash Elixirβ€’2y ago
Francis

SQLite support

Not sure if this is the right place to post this but I still wanted to open the discussion. From what I understand, a ash_sqlite lib is in the plans although it's not known yet when it will be available. If you're looking for help on this one, I'd love to help out for the implementation. In the meantime, what is the suggested approach to use SQLite without too much hassle? Thanks πŸ™‚
9 Replies
frankdugan3
frankdugan3β€’2y ago
Until ash_sqlite is available, the only way to support SQLite would be to write a custom data layer extension for it. If you are interested in trying out an implementation, you could use AshPostgres as a guide. I think there are plans to abstract common parts into something like AshSQL (making it much easier to support all kinds of SQL DBs), but I don't recall if anything has been done in that direction yet.
Francis
FrancisOPβ€’2y ago
Oh interesting! I'll look into the implementation of ash_postgres πŸ™‚
ZachDaniel
ZachDanielβ€’2y ago
Yeah, our basic plan has changed a bit but that’s the gist of it. We’re going to start by copying ash_postgres for ash_sqlite and ash_mysql, and then getting tests passing for each one, and then later abstracting out a common core
fceruti
fcerutiβ€’2y ago
Is the development of ash_sqlite is active? Is there an alpha version I can play with?
ZachDaniel
ZachDanielβ€’2y ago
There is not. However, the essential idea is to just copy the ash_postgres repo and rip out some postgres specific stuff, so I can make that copy and if you want to try it out with the understanding that it hasn't been vetted, you're more than welcome πŸ˜„ lemme make the copy, delete some postgres stuff, and see how many tests fail πŸ˜†
ZachDaniel
ZachDanielβ€’2y ago
GitHub
GitHub - ash-project/ash_sqlite: A SQLite data layer for Ash Framework
A SQLite data layer for Ash Framework. Contribute to ash-project/ash_sqlite development by creating an account on GitHub.
ZachDaniel
ZachDanielβ€’2y ago
Okay, so this is definitely not production ready but the groundwork for basic support of sqlite is done, now just the elbow grease of getting the various bits working/modified from the postgres way of doing things to the sqlite way of doing things 147 tests, 67 failures
fceruti
fcerutiβ€’2y ago
That's awesome, I'll try to contribute when I encounter bugs πŸ˜‰
ZachDaniel
ZachDanielβ€’2y ago
Well it doesn’t even insert data at the moment πŸ˜… But I’ll sort it out this week

Did you find this page helpful?