Example:
select * from user where age > {{ isMen ? 30 : 20 }}
How to parse content in {{ }}
as javascript expression, and supports javascript autocomplete in {{ }}
, and supports sql autocomplete in outer sql content ?
Thanks!
Example:
select * from user where age > {{ isMen ? 30 : 20 }}
How to parse content in {{ }}
as javascript expression, and supports javascript autocomplete in {{ }}
, and supports sql autocomplete in outer sql content ?
Thanks!
You could write an outer mode that separates the content outside the braces from the content inside it, and use mixed parsing to parse each type of content with either the SQL or the JavaScript parser (the latter using the expression top rule).