duckdb 0.3.5-dev1353.0 → 0.3.5-dev1360.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.3.5-dev1353.0",
4
+ "version": "0.3.5-dev1360.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -115880,6 +115880,7 @@ string ClientContext::VerifyQuery(ClientContextLock &lock, const string &query,
115880
115880
  } catch (std::exception &ex) {
115881
115881
  results.push_back(make_unique<MaterializedQueryResult>(ex.what()));
115882
115882
  }
115883
+ interrupted = false;
115883
115884
  }
115884
115885
  config.enable_optimizer = optimizer_enabled;
115885
115886
 
@@ -115890,6 +115891,7 @@ string ClientContext::VerifyQuery(ClientContextLock &lock, const string &query,
115890
115891
  try {
115891
115892
  RunStatementInternal(lock, explain_q, move(explain_stmt), false, false);
115892
115893
  } catch (std::exception &ex) { // LCOV_EXCL_START
115894
+ interrupted = false;
115893
115895
  return "EXPLAIN failed but query did not (" + string(ex.what()) + ")";
115894
115896
  } // LCOV_EXCL_STOP
115895
115897
  }
@@ -156967,7 +156969,28 @@ unique_ptr<Constraint> Transformer::TransformConstraint(duckdb_libpgquery::PGLis
156967
156969
  "dictionary, pfor, bitpacking or fsst");
156968
156970
  }
156969
156971
  return nullptr;
156970
- case duckdb_libpgquery::PG_CONSTR_FOREIGN:
156972
+ case duckdb_libpgquery::PG_CONSTR_FOREIGN: {
156973
+ ForeignKeyInfo fk_info;
156974
+ fk_info.type = ForeignKeyType::FK_TYPE_FOREIGN_KEY_TABLE;
156975
+ if (constraint->pktable->schemaname) {
156976
+ fk_info.schema = constraint->pktable->schemaname;
156977
+ } else {
156978
+ fk_info.schema = "";
156979
+ }
156980
+ fk_info.table = constraint->pktable->relname;
156981
+ vector<string> pk_columns, fk_columns;
156982
+
156983
+ fk_columns.emplace_back(column.Name().c_str());
156984
+ if (constraint->pk_attrs) {
156985
+ for (auto kc = constraint->pk_attrs->head; kc; kc = kc->next) {
156986
+ pk_columns.emplace_back(reinterpret_cast<duckdb_libpgquery::PGValue *>(kc->data.ptr_value)->val.str);
156987
+ }
156988
+ }
156989
+ if (pk_columns.size() != fk_columns.size()) {
156990
+ throw ParserException("The number of referencing and referenced columns for foreign keys must be the same");
156991
+ }
156992
+ return make_unique<ForeignKeyConstraint>(pk_columns, fk_columns, move(fk_info));
156993
+ }
156971
156994
  default:
156972
156995
  throw NotImplementedException("Constraint not implemented!");
156973
156996
  }
@@ -160278,6 +160301,11 @@ unique_ptr<CreateStatement> Transformer::TransformCreateTable(duckdb_libpgquery:
160278
160301
  throw NotImplementedException("ColumnDef type not handled yet");
160279
160302
  }
160280
160303
  }
160304
+
160305
+ if (!column_count) {
160306
+ throw ParserException("Table must have at least one column!");
160307
+ }
160308
+
160281
160309
  result->info = move(info);
160282
160310
  return result;
160283
160311
  }
@@ -174709,8 +174737,8 @@ unique_ptr<BufferHandle> BufferManager::Pin(shared_ptr<BlockHandle> &handle) {
174709
174737
  void BufferManager::AddToEvictionQueue(shared_ptr<BlockHandle> &handle) {
174710
174738
  D_ASSERT(handle->readers == 0);
174711
174739
  handle->eviction_timestamp++;
174740
+ PurgeQueue();
174712
174741
  queue->q.enqueue(make_unique<BufferEvictionNode>(weak_ptr<BlockHandle>(handle), handle->eviction_timestamp));
174713
- // FIXME: do some house-keeping to prevent the queue from being flooded with many old blocks
174714
174742
  }
174715
174743
 
174716
174744
  void BufferManager::Unpin(shared_ptr<BlockHandle> &handle) {
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 "60865b7a0"
15
- #define DUCKDB_VERSION "v0.3.5-dev1353"
14
+ #define DUCKDB_SOURCE_ID "dc74756a0"
15
+ #define DUCKDB_VERSION "v0.3.5-dev1360"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //