Replies: 1 comment
-
maybe db
.from('users')
.select(
db.raw(`
(select ip_address from user_logins where users.id = user_logins.user_id limit 1) as last_login_ip
`)
)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In order to make dynamic column based on JSONB, SQL like this is needed
SELECT *, properties->>'$.ImageSource' as ImageSource FROM images;
However, produced query seems like
properties->>'$`.`fill'
Which fails, because is enclosed in ticks and also the point is enclosed.
It is any way to work around this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions