duckdb 0.5.2-dev604.0 → 0.5.2-dev610.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 +1 -1
- package/src/duckdb.cpp +20 -1
- package/src/duckdb.hpp +4 -2
- package/src/parquet-amalgamation.cpp +30518 -30518
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -141490,8 +141490,10 @@ namespace duckdb {
|
|
|
141490
141490
|
class CreateViewRelation : public Relation {
|
|
141491
141491
|
public:
|
|
141492
141492
|
CreateViewRelation(shared_ptr<Relation> child, string view_name, bool replace, bool temporary);
|
|
141493
|
+
CreateViewRelation(shared_ptr<Relation> child, string schema_name, string view_name, bool replace, bool temporary);
|
|
141493
141494
|
|
|
141494
141495
|
shared_ptr<Relation> child;
|
|
141496
|
+
string schema_name;
|
|
141495
141497
|
string view_name;
|
|
141496
141498
|
bool replace;
|
|
141497
141499
|
bool temporary;
|
|
@@ -141521,6 +141523,13 @@ CreateViewRelation::CreateViewRelation(shared_ptr<Relation> child_p, string view
|
|
|
141521
141523
|
context.GetContext()->TryBindRelation(*this, this->columns);
|
|
141522
141524
|
}
|
|
141523
141525
|
|
|
141526
|
+
CreateViewRelation::CreateViewRelation(shared_ptr<Relation> child_p, string schema_name_p, string view_name_p,
|
|
141527
|
+
bool replace_p, bool temporary_p)
|
|
141528
|
+
: Relation(child_p->context, RelationType::CREATE_VIEW_RELATION), child(move(child_p)),
|
|
141529
|
+
schema_name(move(schema_name_p)), view_name(move(view_name_p)), replace(replace_p), temporary(temporary_p) {
|
|
141530
|
+
context.GetContext()->TryBindRelation(*this, this->columns);
|
|
141531
|
+
}
|
|
141532
|
+
|
|
141524
141533
|
BoundStatement CreateViewRelation::Bind(Binder &binder) {
|
|
141525
141534
|
auto select = make_unique<SelectStatement>();
|
|
141526
141535
|
select->node = child->GetQueryNode();
|
|
@@ -141530,7 +141539,7 @@ BoundStatement CreateViewRelation::Bind(Binder &binder) {
|
|
|
141530
141539
|
info->query = move(select);
|
|
141531
141540
|
info->view_name = view_name;
|
|
141532
141541
|
info->temporary = temporary;
|
|
141533
|
-
info->schema =
|
|
141542
|
+
info->schema = schema_name;
|
|
141534
141543
|
info->on_conflict = replace ? OnCreateConflict::REPLACE_ON_CONFLICT : OnCreateConflict::ERROR_ON_CONFLICT;
|
|
141535
141544
|
stmt.info = move(info);
|
|
141536
141545
|
return binder.Bind((SQLStatement &)stmt);
|
|
@@ -143562,6 +143571,16 @@ shared_ptr<Relation> Relation::CreateView(const string &name, bool replace, bool
|
|
|
143562
143571
|
return shared_from_this();
|
|
143563
143572
|
}
|
|
143564
143573
|
|
|
143574
|
+
shared_ptr<Relation> Relation::CreateView(const string &schema_name, const string &name, bool replace, bool temporary) {
|
|
143575
|
+
auto view = make_shared<CreateViewRelation>(shared_from_this(), schema_name, name, replace, temporary);
|
|
143576
|
+
auto res = view->Execute();
|
|
143577
|
+
if (res->HasError()) {
|
|
143578
|
+
const string prepended_message = "Failed to create view '" + name + "': ";
|
|
143579
|
+
res->ThrowError(prepended_message);
|
|
143580
|
+
}
|
|
143581
|
+
return shared_from_this();
|
|
143582
|
+
}
|
|
143583
|
+
|
|
143565
143584
|
unique_ptr<QueryResult> Relation::Query(const string &sql) {
|
|
143566
143585
|
return context.GetContext()->Query(sql, false);
|
|
143567
143586
|
}
|
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 "
|
|
15
|
-
#define DUCKDB_VERSION "v0.5.2-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "41f579d27"
|
|
15
|
+
#define DUCKDB_VERSION "v0.5.2-dev610"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -23699,6 +23699,8 @@ public:
|
|
|
23699
23699
|
DUCKDB_API void Head(idx_t limit = 10);
|
|
23700
23700
|
|
|
23701
23701
|
DUCKDB_API shared_ptr<Relation> CreateView(const string &name, bool replace = true, bool temporary = false);
|
|
23702
|
+
DUCKDB_API shared_ptr<Relation> CreateView(const string &schema_name, const string &name, bool replace = true,
|
|
23703
|
+
bool temporary = false);
|
|
23702
23704
|
DUCKDB_API unique_ptr<QueryResult> Query(const string &sql);
|
|
23703
23705
|
DUCKDB_API unique_ptr<QueryResult> Query(const string &name, const string &sql);
|
|
23704
23706
|
|