Hey 👋
Currently, to refer to an existing column in query context, you either:
.set('target', (eb) => eb.ref('source'))
or:
.set((eb) => ({
target: eb.ref('source'),
}))
Proposal:
Add setRef to UpdateQueryBuilder to allow:
.setRef('target', 'source')
and perhaps even:
.setRef({
target: 'source',
})
...for use cases where all/most values are coming from referenced columns.
We should always look to provide ways not to use ExpressionBuilder if you're only referencing columns - callbacks are expensive at compile-time, and the query becomes less readable and harder to type.
Hey 👋
Currently, to refer to an existing column in query context, you either:
or:
Proposal:
Add
setReftoUpdateQueryBuilderto allow:and perhaps even:
...for use cases where all/most values are coming from referenced columns.
We should always look to provide ways not to use
ExpressionBuilderif you're only referencing columns - callbacks are expensive at compile-time, and the query becomes less readable and harder to type.