duckdb 0.5.1-dev201.0 → 0.5.1-dev207.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
- "version": "0.5.1-dev201.0",
4
+ "version": "0.5.1-dev207.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -4226,12 +4226,19 @@ unique_ptr<CatalogEntry> TableCatalogEntry::ChangeColumnType(ClientContext &cont
4226
4226
  auto expression = info.expression->Copy();
4227
4227
  auto bound_expression = expr_binder.Bind(expression);
4228
4228
  auto bound_create_info = binder->BindCreateTableInfo(move(create_info));
4229
+ vector<column_t> storage_oids;
4229
4230
  if (bound_columns.empty()) {
4230
- bound_columns.push_back(COLUMN_IDENTIFIER_ROW_ID);
4231
+ storage_oids.push_back(COLUMN_IDENTIFIER_ROW_ID);
4232
+ }
4233
+ // transform to storage_oid
4234
+ else {
4235
+ for (idx_t i = 0; i < bound_columns.size(); i++) {
4236
+ storage_oids.push_back(columns[bound_columns[i]].StorageOid());
4237
+ }
4231
4238
  }
4232
4239
 
4233
- auto new_storage =
4234
- make_shared<DataTable>(context, *storage, change_idx, info.target_type, move(bound_columns), *bound_expression);
4240
+ auto new_storage = make_shared<DataTable>(context, *storage, columns[change_idx].StorageOid(), info.target_type,
4241
+ move(storage_oids), *bound_expression);
4235
4242
  auto result =
4236
4243
  make_unique<TableCatalogEntry>(catalog, schema, (BoundCreateTableInfo *)bound_create_info.get(), new_storage);
4237
4244
  return move(result);
@@ -126701,9 +126708,19 @@ unique_ptr<PendingQueryResult> ClientContext::PendingStatementOrPreparedStatemen
126701
126708
  case StatementType::INSERT_STATEMENT:
126702
126709
  case StatementType::DELETE_STATEMENT:
126703
126710
  case StatementType::UPDATE_STATEMENT: {
126704
- auto sql = statement->ToString();
126705
126711
  Parser parser;
126706
- parser.ParseQuery(sql);
126712
+ PreservedError error;
126713
+ try {
126714
+ parser.ParseQuery(statement->ToString());
126715
+ } catch (const Exception &ex) {
126716
+ error = PreservedError(ex);
126717
+ } catch (std::exception &ex) {
126718
+ error = PreservedError(ex);
126719
+ }
126720
+ if (error) {
126721
+ // error in verifying query
126722
+ return make_unique<PendingQueryResult>(error);
126723
+ }
126707
126724
  statement = move(parser.statements[0]);
126708
126725
  break;
126709
126726
  }
package/src/duckdb.hpp CHANGED
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
11
11
  #pragma once
12
12
  #define DUCKDB_AMALGAMATION 1
13
13
  #define DUCKDB_AMALGAMATION_EXTENDED 1
14
- #define DUCKDB_SOURCE_ID "cb8ebc692"
15
- #define DUCKDB_VERSION "v0.5.1-dev201"
14
+ #define DUCKDB_SOURCE_ID "acbbd9317"
15
+ #define DUCKDB_VERSION "v0.5.1-dev207"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //