Given i have defined the columns of interest in my data objects anyways...
class User { name = null; email = null; }
... i wouldn't necessarily have to repeat them when writing my SQL:
sql`SELECT ${Object.getOwnPropertyNames(new User).map(camelCase).join(', ')} FROM users`
Of course using a better helper function.
There's a few repetitive tasks when writing SQL where don't necessarily need a powerful query builder but still end up writing a few handler functions. Shipping some common helpers with the framework might be handy.
Given i have defined the columns of interest in my data objects anyways...
... i wouldn't necessarily have to repeat them when writing my SQL: Of course using a better helper function.There's a few repetitive tasks when writing SQL where don't necessarily need a powerful query builder but still end up writing a few handler functions. Shipping some common helpers with the framework might be handy.