SQL Dialect with defined string

My webservice uses multiple queries to search a db for inventory items. Because the beginning of all these queries are the same (the select name, price, etc.) I created a string constant using define for the first part. This first part of the string has proper sql dialect support. But when I try to combine it with the second half of a string later in the script, the second half lacks the dialect highlighting. Is there a way to get past this?

2 comments
Comment actions Permalink

Hi there,

Well .. in v9 you may use /** @lang MySQL */ just before the string fragment to inject MySQL dialect into it (or whatever language you want there).

Thing is -- since this will be just part of the query, you may see warnings about invalid SQL syntax.

0
Comment actions Permalink

I guess ideally, the IDE would be able to see part A of the string and recognizing I'm just adding more to a partial query.

0

Please sign in to leave a comment.