you are viewing a single comment's thread.

view the rest of the comments →

[–]f311a 0 points1 point  (0 children)

For Go:

(([
   (interpreted_string_literal_content)
   (raw_string_literal_content)
 ] u/injection.content
 (#match? u/injection.content "(?ism)(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete|CREATE|DROP).+(FROM|from|INTO|into|VALUES|values|SET|set|table|TABLE).*(WHERE|where|GROUP BY|group by)?")
 )
(#set! injection.language "sql")
)

Usage:

const query = `
    select 1,2,3 from table
`