Upstreaming the Exqlite adapter

57 views
Skip to first unread message

Kevin Lang

unread,
Mar 16, 2021, 11:45:38 PM3/16/21
to elixir-ecto

Hello!

We have been hard at work making an Ecto3 adapter for SQLite3, and wanted to know what the steps would be to get our work upstream into the ecto_sql packages, or what things we would need to do before upstreaming can begin.


We currently have more or less every ecto and ecto_sql integration test onboarded that SQLite has the capacity to support, with just a couple edge cases left to fix up. In addition to that we have a large suite of non-integration tests for the core query generation behavior. We have even gone so far as to adapt the benchmark in the ecto_sql repository for insert speed to see how SQLite fares (the results may surprise you): https://github.com/warmwaffles/exqlite/pull/111

I think the long term vision is to split out all the Ecto-related stuff and merge that upstream and keep the exqlite repository around for the core db_connection powered driver.

I hope upstreaming this driver paves the way for better SQLite integration/options with other projects in the future, like Phoenix for example, where the ability to spin up a new Phoenix application without needing to configure Postgres can be beneficial to newcomers or those that don't need the full power of Postgres.

Cheers,
Kevin

José Valim

unread,
Mar 17, 2021, 3:48:44 AM3/17/21
to elixi...@googlegroups.com
Hi Kevin,

First of all, thanks for the work on exqlite - this looks great and the PRs are definitely appreciated!

When we added the TDS adapter to Ecto.SQL, we defined that the rule for adding new adapters to Ecto.SQL would be that they have to be TCP-based. This helped us focus on a common subset with shared functionality - that the Ecto team understands well - and helped us answer why not ODBC variants or similar. Given the current criteria, we have no plans to incorporate exqlite.

> I hope upstreaming this driver paves the way for better SQLite integration/options with other projects in the future, like Phoenix for example, where the ability to spin up a new Phoenix application without needing to configure Postgres can be beneficial to newcomers or those that don't need the full power of Postgres.

FWIW, upstreaming should not get in the way of better integration. :) For example, Phoenix already needs to generate ecto_sql+driver, the difference for something like SQLite is that it needs to generate ecto_sql+adapter instead.

In any case, a PR to update Ecto's README to mention the new adapter will be very welcome. Thank you!

--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/3b644c80-4d37-48f6-b954-a846c9f299a2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages