Created
January 11, 2024 01:37
-
-
Save vojtechkral/96e631eeeb387154f281dc7fc703f1b0 to your computer and use it in GitHub Desktop.
SQL Rust polyglot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select !( --); /* | |
0); | |
-- */ pub const QUERY_1: &str = r##" | |
SELECT foo, bar FROM baz WHERE foo > 10; | |
-- "##; pub const QUERY_2: &str = r##" | |
DELETE FROM baz where foo > 9001; | |
-- "##; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mod sql { | |
macro_rules! select { | |
(--) => {}; | |
} | |
include!("poly.rs.sql"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment