You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if this is already implemented, can't seem to find it.
Is your feature request related to a problem? Please describe.
Let's say I have a users table with fields name, email, dob.
I want to avoid using SELECT * for whatever reason, but in general I always want to select the name, email, dob column. This generally results in multiple "repeated" params, like so:
/* @name getUser */
SELECT name, email, dob FROM users WHERE name = 'xxx';
/* @name listUsers */
SELECT name, email, dob FROM users;
/* @name upsertUsers */
INSERT INTO users (...) VALUES (...) ON CONFLICT DO NOTHING RETURNING name, email, dob;
I'd prefer if I only had to define that once
Describe the solution you'd like
I'd like to able to define some sort of "global param", e.g.
/* @global user name, email, dob */
/* @name getUser */
SELECT @global:user FROM users WHERE name = 'xxx';
/* @name listUsers */
SELECT @global:user FROM users;
/* @name upsertUsers */
INSERT INTO users (...) VALUES (...) ON CONFLICT DO NOTHING RETURNING @global:user;
To avoid having to repeat this.
The text was updated successfully, but these errors were encountered:
Apologies if this is already implemented, can't seem to find it.
Is your feature request related to a problem? Please describe.
Let's say I have a
users
table with fieldsname, email, dob
.I want to avoid using
SELECT *
for whatever reason, but in general I always want to select thename, email, dob
column. This generally results in multiple "repeated" params, like so:I'd prefer if I only had to define that once
Describe the solution you'd like
I'd like to able to define some sort of "global param", e.g.
To avoid having to repeat this.
The text was updated successfully, but these errors were encountered: