Is there a preferred way to automate constructing ...
# squarelibraries
n
Is there a preferred way to automate constructing the adapter classes for SQLDelight when one has lots of custom column types?
j
While you may have a lot of columns with custom types, usually those fall into a set of only a few categories of types requiring only a handful of adapters to be written and then reused for many columns.
Ultimately these adapters scale with the quantity of tables and their columns and not the number of queries you write so while there's an associated verbosity, it doesn't scale up or down at a high rate once you get it set up. This type of verbosity we're comfortable with. A verbosity that would occur for each query you write, however, is less desirable.
n
I'm probably feeling the pain of this more than most as I'm migrating a database heavy app (~60 tables) to SQLDelight. Column adapters scale pretty slowly, so that's easy enough, but I'd like to be lazy about about the
Table.Adapter
class construction. I could use Koin for that or some other injection-like framework. Wondering if there are opinions about what works best with SQLDelight.