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
{{ message }}
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.
varquery=squel.select().field(Squel.select().field('col1').from('table').where('id = ?',id),'col1'// subquery alias).from('DELETE_FROM').toParam();// SELECT (SELECT col1 FROM table WHERE (parent_id = 1)) AS col1 FROM DELETE_FROMquery.text=modifiedQuery.text.split('(SELECT').join('ARRAY(SELECT');// replace allquery.text=modifiedQuery.text.replace(' FROM DELETE_FROM','');// SELECT ARRAY(SELECT col1 FROM table WHERE (id = 1)) AS col1
Things I didn't expect:
If I didn't use .from() then the field parts weren't added.
By using subqueries, the arguments are no longer parameterized via query.values
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I need to use the following style of query:
Which produces something like:
How can I turn it into a squel query while still using
squel.toParam()
?The text was updated successfully, but these errors were encountered: