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
I had a conversation with chatgpt to simplfy my .sql file.
I am repeating the same fields three times for 3 different queries (select_user_by_email, select_user_by_username, select_user_by_id). It recommended this (thought, it didn't work. I guess it is not a feature yet)
-- name: UserColumns :const
SELECT
user_uid,
email,
username,
name,
avatar_url,
created_at,
FROM users
-- name: SearchUsersByEmail :many
/*@ UserColumns */ WHERE email ILIKE $1
ORDER BY created_at DESC
LIMIT $2 OFFSET $3;
-- name: SearchUsersByUsername :many
/*@ UserColumns */ WHERE username ILIKE $1
ORDER BY created_at DESC
LIMIT $2 OFFSET $3;
-- name: SearchUsersByUID :many
/*@ UserColumns */ WHERE user_uid::text = $1
ORDER BY created_at DESC
LIMIT $2 OFFSET $3;
Can we have this feature? Or does everyone use Views in database for this kind of thing?
What database engines need to be changed?
No response
What programming language backends need to be changed?
No response
The text was updated successfully, but these errors were encountered:
What do you want to change?
I had a conversation with chatgpt to simplfy my .sql file.
I am repeating the same fields three times for 3 different queries (select_user_by_email, select_user_by_username, select_user_by_id). It recommended this (thought, it didn't work. I guess it is not a feature yet)
Can we have this feature? Or does everyone use Views in database for this kind of thing?
What database engines need to be changed?
No response
What programming language backends need to be changed?
No response
The text was updated successfully, but these errors were encountered: