Created
October 31, 2017 09:50
-
-
Save alexandruc/542f39a9f752bb1812a6a6353267d00a to your computer and use it in GitHub Desktop.
Readable sql string
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
#include <iostream> | |
#include <string> | |
#define SQL(...) #__VA_ARGS__ | |
int main(int argc, char *argv[]) | |
{ | |
std::string strDynSql = "dynparam"; | |
std::string strSql( SQL( | |
SELECT id | |
FROM lst_quotes | |
WHERE route_id = strDynSql | |
AND lst_request_id = $2 | |
AND quote_id = $3; | |
)); | |
std::cout << strSql << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment