dmitriid
Sqlite, schemaless queries and mapping
One current limitation of the excellent sqlite3 adapter is schemaless queries: Ecto.Adapters.SQLite3 — Ecto SQLite3 v0.24.1
Using schemaless Ecto queries will not work well with SQLite. This is because the Ecto SQLite adapter relies heavily on the schema to support a rich array of Elixir types, despite the fact SQLite only has five storage classes. The query will still work and return data, but you will need to do this mapping on your own.
There’s an open issue to add examples for such mapping: Add examples to documentation for schemaless queries with mappings · Issue #14 · elixir-sqlite/ecto_sqlite3 · GitHub
I was wondering: does any one have examples of how these queries would look? (And these could be added to documentation perhaps)
Most Liked
dimitarvp
Almost exactly like you mentioned. Instead of the library trying to guess the types, it will consult this extra table containing the typing information. It could work.
I never got quite as far as actually implementing it but it was a little over a year ago when I wrote a small prototype in Rust that complemented its rusqlite library and it seemed to work fine on a first glance.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








