jupyter-duckdb 0.10.2.1__py3-none-any.whl → 1.1.2.1__py3-none-any.whl
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.
- duckdb_kernel/db/implementation/duckdb/Connection.py +10 -7
- {jupyter_duckdb-0.10.2.1.dist-info → jupyter_duckdb-1.1.2.1.dist-info}/METADATA +2 -2
- {jupyter_duckdb-0.10.2.1.dist-info → jupyter_duckdb-1.1.2.1.dist-info}/RECORD +5 -5
- {jupyter_duckdb-0.10.2.1.dist-info → jupyter_duckdb-1.1.2.1.dist-info}/WHEEL +1 -1
- {jupyter_duckdb-0.10.2.1.dist-info → jupyter_duckdb-1.1.2.1.dist-info}/top_level.txt +0 -0
|
@@ -101,7 +101,7 @@ class Connection(Base):
|
|
|
101
101
|
table,
|
|
102
102
|
tuple(table.get_column(c) for c in constraint_columns)
|
|
103
103
|
)
|
|
104
|
-
constraints[
|
|
104
|
+
constraints[(table_name, *constraint_columns)] = constraint
|
|
105
105
|
|
|
106
106
|
# store key
|
|
107
107
|
if table.primary_key is not None:
|
|
@@ -134,17 +134,19 @@ class Connection(Base):
|
|
|
134
134
|
table,
|
|
135
135
|
tuple(table.get_column(c) for c in constraint_columns)
|
|
136
136
|
)
|
|
137
|
-
constraints[
|
|
137
|
+
constraints[(table_name, *constraint_columns)] = constraint
|
|
138
138
|
|
|
139
139
|
# store key
|
|
140
140
|
table.unique_keys.append(constraint)
|
|
141
141
|
|
|
142
142
|
# Find foreign keys.
|
|
143
|
-
for table_name, constraint_index, constraint_columns in self.con.execute('''
|
|
143
|
+
for table_name, constraint_index, constraint_columns, referenced_table, referenced_column_names, in self.con.execute('''
|
|
144
144
|
SELECT
|
|
145
145
|
table_name,
|
|
146
146
|
constraint_index,
|
|
147
|
-
constraint_column_names
|
|
147
|
+
constraint_column_names,
|
|
148
|
+
referenced_table,
|
|
149
|
+
referenced_column_names
|
|
148
150
|
FROM duckdb_constraints()
|
|
149
151
|
WHERE constraint_type = 'FOREIGN KEY'
|
|
150
152
|
ORDER BY constraint_index ASC
|
|
@@ -156,10 +158,11 @@ class Connection(Base):
|
|
|
156
158
|
table = tables[table_name]
|
|
157
159
|
|
|
158
160
|
# lookup constraint
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
constraint_key = (referenced_table, *referenced_column_names)
|
|
162
|
+
if constraint_key not in constraints:
|
|
163
|
+
raise AssertionError(f'constraint with key {constraint_key} not discovered previously')
|
|
161
164
|
|
|
162
|
-
constraint = constraints[
|
|
165
|
+
constraint = constraints[constraint_key]
|
|
163
166
|
|
|
164
167
|
# store key
|
|
165
168
|
key = ForeignKey(tuple(table.get_column(c) for c in constraint_columns), constraint)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: jupyter-duckdb
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.1.2.1
|
|
4
4
|
Summary: a basic wrapper kernel for DuckDB
|
|
5
5
|
Home-page: https://github.com/erictroebs/jupyter-duckdb
|
|
6
6
|
Author: Eric Tröbs
|
|
@@ -14,7 +14,7 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
Requires-Dist: jupyter
|
|
15
15
|
Requires-Dist: graphviz ==0.20.3
|
|
16
16
|
Requires-Dist: checkmarkandcross
|
|
17
|
-
Requires-Dist: duckdb ==
|
|
17
|
+
Requires-Dist: duckdb ==1.1.2
|
|
18
18
|
|
|
19
19
|
# DuckDB Kernel for Jupyter
|
|
20
20
|
|
|
@@ -11,7 +11,7 @@ duckdb_kernel/db/Table.py,sha256=6M_CTBV3QlrL_7CdYfu6s9LelXBQ5RdMUAyntE6xcDI,746
|
|
|
11
11
|
duckdb_kernel/db/__init__.py,sha256=PKQYQDCW7VQYxmzhQK6A0Qloka9FdMfeFQMfY-CjBSA,198
|
|
12
12
|
duckdb_kernel/db/error/EmptyResultError.py,sha256=N9Oxi2HDZBKaRQsfRsWpJJGOYX4BjdQqWOU-XvzUzNY,92
|
|
13
13
|
duckdb_kernel/db/error/__init__.py,sha256=oHfhfbcfyTJ3pAPN835omdQcebvJTauuULFx5gm9rq4,47
|
|
14
|
-
duckdb_kernel/db/implementation/duckdb/Connection.py,sha256=
|
|
14
|
+
duckdb_kernel/db/implementation/duckdb/Connection.py,sha256=aGW1QKcwxTb9N49v_Y7AUCs8ZEH4cthFycISDasQ-_4,6321
|
|
15
15
|
duckdb_kernel/db/implementation/duckdb/__init__.py,sha256=HKogB1es4wOiQUoh7_eT32xnUFLmzoCyR_0LuY9r8YQ,35
|
|
16
16
|
duckdb_kernel/db/implementation/postgres/Connection.py,sha256=JB5zPMBwt-iySMIeLi1WIvRB0jRckHDUhWw7GtKnndA,8738
|
|
17
17
|
duckdb_kernel/db/implementation/postgres/__init__.py,sha256=HKogB1es4wOiQUoh7_eT32xnUFLmzoCyR_0LuY9r8YQ,35
|
|
@@ -76,7 +76,7 @@ duckdb_kernel/visualization/Drawer.py,sha256=D0LkiGMvuJ2v6cQSg_axLTGaM4VXAJEQJAy
|
|
|
76
76
|
duckdb_kernel/visualization/RATreeDrawer.py,sha256=j-Vy1zpYMzwZ3CsphyfPW-J7ou9a9tM6aXXgAlQTgDI,2128
|
|
77
77
|
duckdb_kernel/visualization/SchemaDrawer.py,sha256=fkp7tnyfzKQBXVI6X7efAvT8lczi_XlA7Hc_rhP_47s,2955
|
|
78
78
|
duckdb_kernel/visualization/__init__.py,sha256=5eMJmxJ01XAXcgWDn3t70eSZF2PGaXdNo6GK-x-0H3s,78
|
|
79
|
-
jupyter_duckdb-
|
|
80
|
-
jupyter_duckdb-
|
|
81
|
-
jupyter_duckdb-
|
|
82
|
-
jupyter_duckdb-
|
|
79
|
+
jupyter_duckdb-1.1.2.1.dist-info/METADATA,sha256=R1DdUj-pHH1m8CRWDCvLXzwAmRdQQtwENOxHNgLDL-0,7764
|
|
80
|
+
jupyter_duckdb-1.1.2.1.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
81
|
+
jupyter_duckdb-1.1.2.1.dist-info/top_level.txt,sha256=KvRRPMnmkQNuhyBsXoPmwyt26LRDp0O-0HN6u0Dm5jA,14
|
|
82
|
+
jupyter_duckdb-1.1.2.1.dist-info/RECORD,,
|
|
File without changes
|