drift icon indicating copy to clipboard operation
drift copied to clipboard

Drift files: Support Dart placeholders for updates

Open simolus3 opened this issue 8 months ago • 0 comments

In drift files, companions can be referenced for insert statements using

createUser: INSERT INTO users $newUser;

which will then make drift generate a createUser(Insertable<User> newUser) method to supply different columns.

This syntax does not currently work for updates, but something like UPDATE users SET $changes might be nice to have.

simolus3 avatar Apr 04 '25 07:04 simolus3