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
Initially I just wanted to use a variable string as the query and found I could do this by using .unsafe(query). However, when I chain .values() with this, and then attempt to use .columns with the result, it now ends up as NULL instead of the columns. Below is the example code:
result = await sql.unsafe(query).values() console.log('result in call is:', result.columns)
And console will now be result in call is: null
Which normally gives the column names.
If values() doesn't work with .unsafe, is there an alternative to using a javascript variable as the query. e.g. query = "Select * from schema.table" then just use sql${query}.values() ?