sqlc
sqlc copied to clipboard
Sass-like variables
What do you want to change?
I would like Sass-like variables to be written in sql so I can use the same value across both a column's default and a insert default (in the event of a null parameter). This is useful for being able to have optional parameters for insert statements.
create table plants(color text not null default :default_color);
insert into plants(color) values (coalesce(sqlc.narg(c), :default_color);
What database engines need to be changed?
No response
What programming language backends need to be changed?
No response