-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ODBC: SQLGetTypeInfo, SQLTables, and SQLColumns #2973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Looks good. Some comments:
tools/odbc/api_info.cpp
Outdated
bool first = true; | ||
for (auto info_type : vec_types) { | ||
query += "("; | ||
if (first) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this first
necessary or can we always output the casts?
tools/odbc/include/odbc_utils.hpp
Outdated
#include <string> | ||
#include <vector> | ||
|
||
using std::string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid using
in headers
tools/odbc/odbc_utils.cpp
Outdated
string OdbcUtils::GetQueryDuckdbColumns(const string &catalog_filter, const string &schema_filter, | ||
const string &table_filter, const string &column_filter) { | ||
string sql_duckdb_columns = | ||
"SELECT " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQL statements can be made a lot more readable by using multi-line string literals, e.g.:
string sql_duckdb_columns = R"(
SELECT NULL "TABLE_CAT",
schema_name, ...
)";
Thanks for the updates! Looks great. |
Hey all,
This PR implements the functions: SQLGetTypeInfo, SQLTables, and SQLColumns, according with the ODBC conformance core level.