Skip to content

Commit

Permalink
format for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
elefeint committed Mar 27, 2024
1 parent 58d2d5e commit 6c58704
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/sql_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,16 @@ std::vector<column_def> describe_table(duckdb::Connection &con,
// TBD scale/precision
std::vector<column_def> columns;

auto query = "SELECT column_name, data_type_id, NOT is_nullable, "
"numeric_precision, numeric_scale FROM "
"duckdb_columns() WHERE database_name=? AND "
"schema_name=? AND table_name=?";
auto query = "SELECT "
"column_name, "
"data_type_id, "
"NOT is_nullable, "
"numeric_precision, "
"numeric_scale "
"FROM duckdb_columns() "
"WHERE database_name=? "
"AND schema_name=? "
"AND table_name=?";
mdlog::info("describe_table: " + std::string(query));
auto statement = con.Prepare(query);
duckdb::vector<duckdb::Value> params = {duckdb::Value(table.db_name),
Expand Down

0 comments on commit 6c58704

Please sign in to comment.