1 | #include <iostream> |
---|---|
2 | #include <Common/Exception.h> |
3 | #include "../validateODBCConnectionString.h" |
4 | |
5 | |
6 | using namespace DB; |
7 | |
8 | int main(int argc, char ** argv) |
9 | try |
10 | { |
11 | if (argc < 2) |
12 | { |
13 | std::cerr << "Usage: validate-odbc-connection-string 'ConnectionString'\n"; |
14 | return 1; |
15 | } |
16 | |
17 | std::cout << validateODBCConnectionString(argv[1]) << '\n'; |
18 | return 0; |
19 | } |
20 | catch (...) |
21 | { |
22 | std::cerr << getCurrentExceptionMessage(false) << "\n"; |
23 | return 2; |
24 | } |
25 |