jupyter-duckdb 1.2.100__tar.gz → 1.4.106__tar.gz
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.
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/PKG-INFO +18 -15
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/README.md +14 -11
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/setup.py +6 -4
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Connection.py +3 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/duckdb/Connection.py +3 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/postgres/Connection.py +8 -1
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/sqlite/Connection.py +3 -0
- jupyter_duckdb-1.4.106/src/duckdb_kernel/kernel.py +765 -0
- jupyter_duckdb-1.4.106/src/duckdb_kernel/magics/MagicCommandCallback.py +24 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/MagicCommandHandler.py +18 -10
- jupyter_duckdb-1.4.106/src/duckdb_kernel/magics/MagicState.py +11 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/__init__.py +1 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/RAParser.py +5 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAElement.py +4 -1
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/And.py +1 -1
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/ConditionalSet.py +7 -1
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Cross.py +1 -1
- jupyter_duckdb-1.4.106/src/duckdb_kernel/parser/elements/binary/LeftSemiJoin.py +24 -0
- jupyter_duckdb-1.4.106/src/duckdb_kernel/parser/elements/binary/RightSemiJoin.py +24 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/__init__.py +3 -1
- jupyter_duckdb-1.4.106/src/duckdb_kernel/parser/util/QuerySplitter.py +87 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/__init__.py +2 -2
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_ra.py +385 -10
- jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/Plotly.py +144 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/RATreeDrawer.py +34 -2
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/__init__.py +1 -0
- jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/__init__.py +53 -0
- jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/plotly-3.0.1.min.js +3879 -0
- jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/ra.css +3 -0
- jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/ra.js +55 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/jupyter_duckdb.egg-info/PKG-INFO +18 -15
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/jupyter_duckdb.egg-info/SOURCES.txt +9 -1
- jupyter_duckdb-1.4.106/src/jupyter_duckdb.egg-info/requires.txt +4 -0
- jupyter_duckdb-1.2.100/src/duckdb_kernel/kernel.py +0 -634
- jupyter_duckdb-1.2.100/src/duckdb_kernel/magics/MagicCommandCallback.py +0 -31
- jupyter_duckdb-1.2.100/src/duckdb_kernel/magics/StringWrapper.py +0 -3
- jupyter_duckdb-1.2.100/src/jupyter_duckdb.egg-info/requires.txt +0 -4
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/setup.cfg +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/__main__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Column.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Constraint.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/DatabaseError.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/ForeignKey.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Table.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/error/EmptyResultError.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/error/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/duckdb/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/postgres/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/postgres/util.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/sqlite/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/kernel.json +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/MagicCommand.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/MagicCommandException.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/DCParser.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/LogicParser.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/ParserError.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/DCOperand.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/LogicElement.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/LogicOperand.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/LogicOperator.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RABinaryOperator.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAOperand.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAOperator.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAUnaryOperator.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Add.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/ArrowLeft.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Difference.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Divide.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Division.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Equal.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/FullOuterJoin.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/GreaterThan.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/GreaterThanEqual.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Intersection.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Join.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/LeftOuterJoin.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/LessThan.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/LessThanEqual.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Minus.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Multiply.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Or.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/RightOuterJoin.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Unequal.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Union.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Not.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Projection.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Rename.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Selection.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/tokenizer/Token.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/tokenizer/Tokenizer.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/tokenizer/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/util/RenamableColumn.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/util/RenamableColumnList.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/util/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_dc.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_result_comparison.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_sql.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/ResultSetComparator.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/SQL.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/TestError.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/__init__.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/formatting.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/Drawer.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/SchemaDrawer.py +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/jupyter_duckdb.egg-info/dependency_links.txt +0 -0
- {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/jupyter_duckdb.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: jupyter-duckdb
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.106
|
|
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
|
|
@@ -12,9 +12,9 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Requires-Python: >=3.10
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
Requires-Dist: jupyter
|
|
15
|
-
Requires-Dist: graphviz==0.
|
|
15
|
+
Requires-Dist: graphviz==0.21
|
|
16
16
|
Requires-Dist: checkmarkandcross
|
|
17
|
-
Requires-Dist: duckdb==1.
|
|
17
|
+
Requires-Dist: duckdb==1.4.1
|
|
18
18
|
Dynamic: author
|
|
19
19
|
Dynamic: author-email
|
|
20
20
|
Dynamic: classifier
|
|
@@ -45,6 +45,7 @@ There are some magic commands that make teaching easier with this kernel.
|
|
|
45
45
|
- [Ship Tests With Your Notebook](#ship-tests-with-your-notebooks)
|
|
46
46
|
- [Relational Algebra](#relational-algebra)
|
|
47
47
|
- [Domain Calculus](#domain-calculus)
|
|
48
|
+
- [Automated Parser Selection](#automated-parser-selection)
|
|
48
49
|
|
|
49
50
|
## Setup
|
|
50
51
|
|
|
@@ -118,23 +119,24 @@ another DuckDB file or a file with SQL statements. In the first case the
|
|
|
118
119
|
included tables will be copied to the new database, while in the second case the
|
|
119
120
|
SQL statements are just executed. We find this feature very useful to work in a
|
|
120
121
|
temporary copy of the data and therefore be able to restart at any time. The
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
optional parameter `NAME` may be used to name a connection and reference it
|
|
123
|
+
later by using the magic command `USE`.
|
|
123
124
|
|
|
124
125
|
```
|
|
125
126
|
%CREATE data.duckdb OF my_statements.sql
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
`LOAD` on the other hand loads an existing database and returns an error if it
|
|
129
|
-
does not exist. (That is why `OF` cannot be used with `LOAD`! `
|
|
130
|
-
|
|
130
|
+
does not exist. (That is why `OF` cannot be used with `LOAD`! `NAME` on the
|
|
131
|
+
other hand is available also with this magic command.)
|
|
131
132
|
|
|
132
133
|
```
|
|
133
134
|
%LOAD data.duckdb
|
|
134
135
|
```
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
loaded, the current one is closed first and saved to disk
|
|
137
|
+
Multiple databases can be open at any time. If a new database with the same
|
|
138
|
+
name is created or loaded, the current one is closed first and saved to disk
|
|
139
|
+
if necessary.
|
|
138
140
|
|
|
139
141
|
Please note that `:memory:` is also a valid file path for DuckDB. The data is
|
|
140
142
|
then stored exclusively in the main memory. In combination with `CREATE`
|
|
@@ -213,10 +215,10 @@ FROM bar
|
|
|
213
215
|
|
|
214
216
|
### Ship Tests With Your Notebooks
|
|
215
217
|
|
|
216
|
-
Simple tests can be loaded
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
Simple tests can be loaded from json files with the help of magic command
|
|
219
|
+
`LOAD_TESTS`. These tests are stored as a JSON file. Each test is assigned a
|
|
220
|
+
unique name, a result set and whether the test should check the order of the
|
|
221
|
+
result. A very simple test file looks like the following JSON object:
|
|
220
222
|
|
|
221
223
|
```json
|
|
222
224
|
{
|
|
@@ -280,6 +282,8 @@ The supported operations are:
|
|
|
280
282
|
The optional flag `ANALYZE` can be used to add an execution diagram to the
|
|
281
283
|
output.
|
|
282
284
|
|
|
285
|
+
You can also add comments to queries using `--` or `/* */`, just like in SQL.
|
|
286
|
+
|
|
283
287
|
The Dockerfile also installs the Jupyter Lab plugin
|
|
284
288
|
[jupyter-ra-extension](https://pypi.org/project/jupyter-ra-extension/). It adds
|
|
285
289
|
the symbols mentioned above and some other supported symbols to the toolbar for
|
|
@@ -303,4 +307,3 @@ executed cells.
|
|
|
303
307
|
If the magic command `%AUTO_PARSER` is added to a cell, a parser is
|
|
304
308
|
automatically selected. If `%GUESS_PARSER` is executed, the parser is
|
|
305
309
|
automatically selected for all subsequent cells.
|
|
306
|
-
|
|
@@ -17,6 +17,7 @@ There are some magic commands that make teaching easier with this kernel.
|
|
|
17
17
|
- [Ship Tests With Your Notebook](#ship-tests-with-your-notebooks)
|
|
18
18
|
- [Relational Algebra](#relational-algebra)
|
|
19
19
|
- [Domain Calculus](#domain-calculus)
|
|
20
|
+
- [Automated Parser Selection](#automated-parser-selection)
|
|
20
21
|
|
|
21
22
|
## Setup
|
|
22
23
|
|
|
@@ -90,23 +91,24 @@ another DuckDB file or a file with SQL statements. In the first case the
|
|
|
90
91
|
included tables will be copied to the new database, while in the second case the
|
|
91
92
|
SQL statements are just executed. We find this feature very useful to work in a
|
|
92
93
|
temporary copy of the data and therefore be able to restart at any time. The
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
optional parameter `NAME` may be used to name a connection and reference it
|
|
95
|
+
later by using the magic command `USE`.
|
|
95
96
|
|
|
96
97
|
```
|
|
97
98
|
%CREATE data.duckdb OF my_statements.sql
|
|
98
99
|
```
|
|
99
100
|
|
|
100
101
|
`LOAD` on the other hand loads an existing database and returns an error if it
|
|
101
|
-
does not exist. (That is why `OF` cannot be used with `LOAD`! `
|
|
102
|
-
|
|
102
|
+
does not exist. (That is why `OF` cannot be used with `LOAD`! `NAME` on the
|
|
103
|
+
other hand is available also with this magic command.)
|
|
103
104
|
|
|
104
105
|
```
|
|
105
106
|
%LOAD data.duckdb
|
|
106
107
|
```
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
loaded, the current one is closed first and saved to disk
|
|
109
|
+
Multiple databases can be open at any time. If a new database with the same
|
|
110
|
+
name is created or loaded, the current one is closed first and saved to disk
|
|
111
|
+
if necessary.
|
|
110
112
|
|
|
111
113
|
Please note that `:memory:` is also a valid file path for DuckDB. The data is
|
|
112
114
|
then stored exclusively in the main memory. In combination with `CREATE`
|
|
@@ -185,10 +187,10 @@ FROM bar
|
|
|
185
187
|
|
|
186
188
|
### Ship Tests With Your Notebooks
|
|
187
189
|
|
|
188
|
-
Simple tests can be loaded
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
Simple tests can be loaded from json files with the help of magic command
|
|
191
|
+
`LOAD_TESTS`. These tests are stored as a JSON file. Each test is assigned a
|
|
192
|
+
unique name, a result set and whether the test should check the order of the
|
|
193
|
+
result. A very simple test file looks like the following JSON object:
|
|
192
194
|
|
|
193
195
|
```json
|
|
194
196
|
{
|
|
@@ -252,6 +254,8 @@ The supported operations are:
|
|
|
252
254
|
The optional flag `ANALYZE` can be used to add an execution diagram to the
|
|
253
255
|
output.
|
|
254
256
|
|
|
257
|
+
You can also add comments to queries using `--` or `/* */`, just like in SQL.
|
|
258
|
+
|
|
255
259
|
The Dockerfile also installs the Jupyter Lab plugin
|
|
256
260
|
[jupyter-ra-extension](https://pypi.org/project/jupyter-ra-extension/). It adds
|
|
257
261
|
the symbols mentioned above and some other supported symbols to the toolbar for
|
|
@@ -275,4 +279,3 @@ executed cells.
|
|
|
275
279
|
If the magic command `%AUTO_PARSER` is added to a cell, a parser is
|
|
276
280
|
automatically selected. If `%GUESS_PARSER` is executed, the parser is
|
|
277
281
|
automatically selected for all subsequent cells.
|
|
278
|
-
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import os
|
|
2
2
|
|
|
3
3
|
# configuration
|
|
4
|
-
PACKAGE_VERSION = '1.
|
|
5
|
-
DUCKDB_VERSION = '1.
|
|
4
|
+
PACKAGE_VERSION = '1.4.106'
|
|
5
|
+
DUCKDB_VERSION = '1.4.1'
|
|
6
6
|
|
|
7
7
|
DEPENDENCIES = [
|
|
8
8
|
'jupyter',
|
|
9
|
-
'graphviz==0.
|
|
9
|
+
'graphviz==0.21',
|
|
10
10
|
'checkmarkandcross'
|
|
11
11
|
]
|
|
12
12
|
|
|
@@ -46,7 +46,9 @@ if __name__ == '__main__':
|
|
|
46
46
|
include_package_data=True,
|
|
47
47
|
package_data={
|
|
48
48
|
'duckdb_kernel': [
|
|
49
|
-
'kernel.json'
|
|
49
|
+
'kernel.json',
|
|
50
|
+
'visualization/lib/*.css',
|
|
51
|
+
'visualization/lib/*.js',
|
|
50
52
|
]
|
|
51
53
|
}
|
|
52
54
|
)
|
|
@@ -19,6 +19,7 @@ class Connection(Base):
|
|
|
19
19
|
self.host: str = host
|
|
20
20
|
self.port: int = port
|
|
21
21
|
self.username: Optional[str] = username
|
|
22
|
+
self.password: Optional[str] = password
|
|
22
23
|
|
|
23
24
|
options = {
|
|
24
25
|
'host': host,
|
|
@@ -43,6 +44,9 @@ class Connection(Base):
|
|
|
43
44
|
def close(self):
|
|
44
45
|
self.con.close()
|
|
45
46
|
|
|
47
|
+
def copy(self) -> 'Connection':
|
|
48
|
+
return Connection(self.host, self.port, self.username, self.password, self.database_name)
|
|
49
|
+
|
|
46
50
|
def __str__(self) -> str:
|
|
47
51
|
user = f'{self.username}@' if self.username is not None else ''
|
|
48
52
|
return f'PostgreSQL: {user}{self.host}:{self.port}/{self.database_name}'
|
|
@@ -63,7 +67,10 @@ class Connection(Base):
|
|
|
63
67
|
rows = cursor.fetchall()
|
|
64
68
|
except psycopg.ProgrammingError as e:
|
|
65
69
|
text = str(e)
|
|
66
|
-
if text
|
|
70
|
+
if text.startswith((
|
|
71
|
+
"the last operation didn't produce a result",
|
|
72
|
+
"the last operation didn't produce records"
|
|
73
|
+
)):
|
|
67
74
|
raise EmptyResultError()
|
|
68
75
|
else:
|
|
69
76
|
raise e
|