This is about SQLDelight:
Is there a convenient way to generate a couple of default functions for all tables? E.g.
getAll
,
getById(id)
,
deleteById
, etc.
I find myself writing them in the sq files for most tables anyway, and that is copy-pasting I'd like to avoid.
I know this is predicated on some conditions, like having a atomic
id
property, etc. But again, I find myself writing tables mostly compatible.
d
Darron Schall
02/22/2023, 10:32 PM
The plugin does this for you with code generation and live templates.
Right click on a table, then select "Generate" from the popup menu, then pick the option, like "Select By Primary Key", and the plugin automatically generates the