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
const selectSQL = sql`
"Json" -> 'Email' AS "Email",
"Json" -> 'FullName' AS "FullName",
"Json" -> 'CurrentRole' AS "CurrentRole",
"Json" -> 'Roles' AS "Roles",
"Json" -> 'External' AS "External",
"Json" -> 'Locked' AS "Locked",
"Json" -> 'LoginAt' AS "LoginAt"
`
await sql`
SELECT
${selectSQL}
FROM
${sql(tablename)}
`
Any suggestions on how to do this from a list of column names e.g. [ "Email", "FullName", etc ]. Not sure how to piece the sql fragments together with the template literals.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to do following dynamically:
Any suggestions on how to do this from a list of column names e.g. [ "Email", "FullName", etc ]. Not sure how to piece the sql fragments together with the template literals.
Thanks
Duke
Beta Was this translation helpful? Give feedback.
All reactions