I mean, sure, there's always ```queryExecute(" S...
# adobe
m
I mean, sure, there's always
Copy code
queryExecute("
  SELECT *
  FROM someTable
    INNER JOIN blahTable" // some handy comment
    & " INNER JOIN otherTable
  WHERE x = y",
  {...}, {...}
)
but..... ew.
d
FWIW (~0), I don't mind the // comment, that's how you do inline comments in cfscript. You can also do the multi-line version /* bleh woof */. This is cfscript, not tag-based cfml, and not sql.
m
yeah, the // comment is ok - just the string concat to break out and back in on the next line that's clunky whenever you want to add such a comment. I just wish it supported in-string SQL style comments (the
--
line-ending comments and/or the c-style
/**/
ones). I suspect though that they just remove line breaks before feeding the query over to the db, so the
--
are out. No reason why it couldn't support
/**/
though. Or even support both and strip them out before sending to the db. 🤷
d
This doesn't work:
/**/
? I thought it would.
m
sadly, not in my testing (at least in ACF - not sure about Lucee)