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.
Files changed (111) hide show
  1. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/PKG-INFO +18 -15
  2. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/README.md +14 -11
  3. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/setup.py +6 -4
  4. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Connection.py +3 -0
  5. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/duckdb/Connection.py +3 -0
  6. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/postgres/Connection.py +8 -1
  7. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/sqlite/Connection.py +3 -0
  8. jupyter_duckdb-1.4.106/src/duckdb_kernel/kernel.py +765 -0
  9. jupyter_duckdb-1.4.106/src/duckdb_kernel/magics/MagicCommandCallback.py +24 -0
  10. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/MagicCommandHandler.py +18 -10
  11. jupyter_duckdb-1.4.106/src/duckdb_kernel/magics/MagicState.py +11 -0
  12. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/__init__.py +1 -0
  13. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/RAParser.py +5 -0
  14. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAElement.py +4 -1
  15. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/And.py +1 -1
  16. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/ConditionalSet.py +7 -1
  17. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Cross.py +1 -1
  18. jupyter_duckdb-1.4.106/src/duckdb_kernel/parser/elements/binary/LeftSemiJoin.py +24 -0
  19. jupyter_duckdb-1.4.106/src/duckdb_kernel/parser/elements/binary/RightSemiJoin.py +24 -0
  20. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/__init__.py +3 -1
  21. jupyter_duckdb-1.4.106/src/duckdb_kernel/parser/util/QuerySplitter.py +87 -0
  22. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/__init__.py +2 -2
  23. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_ra.py +385 -10
  24. jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/Plotly.py +144 -0
  25. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/RATreeDrawer.py +34 -2
  26. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/__init__.py +1 -0
  27. jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/__init__.py +53 -0
  28. jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/plotly-3.0.1.min.js +3879 -0
  29. jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/ra.css +3 -0
  30. jupyter_duckdb-1.4.106/src/duckdb_kernel/visualization/lib/ra.js +55 -0
  31. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/jupyter_duckdb.egg-info/PKG-INFO +18 -15
  32. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/jupyter_duckdb.egg-info/SOURCES.txt +9 -1
  33. jupyter_duckdb-1.4.106/src/jupyter_duckdb.egg-info/requires.txt +4 -0
  34. jupyter_duckdb-1.2.100/src/duckdb_kernel/kernel.py +0 -634
  35. jupyter_duckdb-1.2.100/src/duckdb_kernel/magics/MagicCommandCallback.py +0 -31
  36. jupyter_duckdb-1.2.100/src/duckdb_kernel/magics/StringWrapper.py +0 -3
  37. jupyter_duckdb-1.2.100/src/jupyter_duckdb.egg-info/requires.txt +0 -4
  38. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/setup.cfg +0 -0
  39. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/__init__.py +0 -0
  40. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/__main__.py +0 -0
  41. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Column.py +0 -0
  42. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Constraint.py +0 -0
  43. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/DatabaseError.py +0 -0
  44. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/ForeignKey.py +0 -0
  45. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/Table.py +0 -0
  46. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/__init__.py +0 -0
  47. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/error/EmptyResultError.py +0 -0
  48. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/error/__init__.py +0 -0
  49. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/duckdb/__init__.py +0 -0
  50. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/postgres/__init__.py +0 -0
  51. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/postgres/util.py +0 -0
  52. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/db/implementation/sqlite/__init__.py +0 -0
  53. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/kernel.json +0 -0
  54. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/MagicCommand.py +0 -0
  55. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/magics/MagicCommandException.py +0 -0
  56. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/DCParser.py +0 -0
  57. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/LogicParser.py +0 -0
  58. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/ParserError.py +0 -0
  59. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/__init__.py +0 -0
  60. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/DCOperand.py +0 -0
  61. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/LogicElement.py +0 -0
  62. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/LogicOperand.py +0 -0
  63. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/LogicOperator.py +0 -0
  64. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RABinaryOperator.py +0 -0
  65. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAOperand.py +0 -0
  66. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAOperator.py +0 -0
  67. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/RAUnaryOperator.py +0 -0
  68. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/__init__.py +0 -0
  69. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Add.py +0 -0
  70. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/ArrowLeft.py +0 -0
  71. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Difference.py +0 -0
  72. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Divide.py +0 -0
  73. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Division.py +0 -0
  74. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Equal.py +0 -0
  75. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/FullOuterJoin.py +0 -0
  76. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/GreaterThan.py +0 -0
  77. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/GreaterThanEqual.py +0 -0
  78. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Intersection.py +0 -0
  79. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Join.py +0 -0
  80. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/LeftOuterJoin.py +0 -0
  81. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/LessThan.py +0 -0
  82. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/LessThanEqual.py +0 -0
  83. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Minus.py +0 -0
  84. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Multiply.py +0 -0
  85. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Or.py +0 -0
  86. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/RightOuterJoin.py +0 -0
  87. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Unequal.py +0 -0
  88. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/binary/Union.py +0 -0
  89. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Not.py +0 -0
  90. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Projection.py +0 -0
  91. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Rename.py +0 -0
  92. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/Selection.py +0 -0
  93. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/elements/unary/__init__.py +0 -0
  94. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/tokenizer/Token.py +0 -0
  95. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/tokenizer/Tokenizer.py +0 -0
  96. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/tokenizer/__init__.py +0 -0
  97. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/util/RenamableColumn.py +0 -0
  98. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/util/RenamableColumnList.py +0 -0
  99. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/parser/util/__init__.py +0 -0
  100. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_dc.py +0 -0
  101. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_result_comparison.py +0 -0
  102. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/tests/test_sql.py +0 -0
  103. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/ResultSetComparator.py +0 -0
  104. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/SQL.py +0 -0
  105. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/TestError.py +0 -0
  106. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/__init__.py +0 -0
  107. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/util/formatting.py +0 -0
  108. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/Drawer.py +0 -0
  109. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/duckdb_kernel/visualization/SchemaDrawer.py +0 -0
  110. {jupyter_duckdb-1.2.100 → jupyter_duckdb-1.4.106}/src/jupyter_duckdb.egg-info/dependency_links.txt +0 -0
  111. {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.2
1
+ Metadata-Version: 2.4
2
2
  Name: jupyter-duckdb
3
- Version: 1.2.100
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.20.3
15
+ Requires-Dist: graphviz==0.21
16
16
  Requires-Dist: checkmarkandcross
17
- Requires-Dist: duckdb==1.2.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
- last optional parameter `WITH_TESTS` is described in
122
- detail [below](#ship-tests-with-your-notebooks).
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`! `WITH_TESTS` on
130
- the other hand is available also with this magic command.)
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
- Only one database can be open at any time. If a new database is created or
137
- loaded, the current one is closed first and saved to disk if necessary.
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 together with the database with the help of
217
- the `WITH_TESTS` parameter. These tests are stored as a JSON file. Each test is
218
- assigned a unique name, a result set and whether the test should check the order
219
- of the result. A very simple test file looks like the following JSON object:
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
- last optional parameter `WITH_TESTS` is described in
94
- detail [below](#ship-tests-with-your-notebooks).
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`! `WITH_TESTS` on
102
- the other hand is available also with this magic command.)
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
- Only one database can be open at any time. If a new database is created or
109
- loaded, the current one is closed first and saved to disk if necessary.
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 together with the database with the help of
189
- the `WITH_TESTS` parameter. These tests are stored as a JSON file. Each test is
190
- assigned a unique name, a result set and whether the test should check the order
191
- of the result. A very simple test file looks like the following JSON object:
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.2.100'
5
- DUCKDB_VERSION = '1.2.1'
4
+ PACKAGE_VERSION = '1.4.106'
5
+ DUCKDB_VERSION = '1.4.1'
6
6
 
7
7
  DEPENDENCIES = [
8
8
  'jupyter',
9
- 'graphviz==0.20.3',
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
  )
@@ -10,6 +10,9 @@ class Connection:
10
10
  def close(self):
11
11
  pass
12
12
 
13
+ def copy(self) -> 'Connection':
14
+ raise NotImplementedError
15
+
13
16
  @staticmethod
14
17
  def plain_explain() -> bool:
15
18
  return False
@@ -15,6 +15,9 @@ class Connection(Base):
15
15
  def close(self):
16
16
  self.con.close()
17
17
 
18
+ def copy(self) -> 'Connection':
19
+ return Connection(self.path)
20
+
18
21
  @staticmethod
19
22
  def plain_explain() -> bool:
20
23
  return True
@@ -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 == "the last operation didn't produce a result":
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
@@ -16,6 +16,9 @@ class Connection(Base):
16
16
  def close(self):
17
17
  self.con.close()
18
18
 
19
+ def copy(self) -> 'Connection':
20
+ return Connection(self.path)
21
+
19
22
  @staticmethod
20
23
  def multiple_statements_per_query() -> bool:
21
24
  return False