jupyter-duckdb 1.2.101__py3-none-any.whl → 1.2.103__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/Connection.py +3 -0
- duckdb_kernel/db/implementation/duckdb/Connection.py +3 -0
- duckdb_kernel/db/implementation/postgres/Connection.py +4 -0
- duckdb_kernel/db/implementation/sqlite/Connection.py +3 -0
- duckdb_kernel/kernel.py +229 -190
- duckdb_kernel/magics/MagicCommandCallback.py +7 -14
- duckdb_kernel/magics/MagicCommandHandler.py +9 -9
- duckdb_kernel/magics/MagicState.py +11 -0
- duckdb_kernel/magics/__init__.py +1 -0
- duckdb_kernel/visualization/Plotly.py +8 -18
- duckdb_kernel/visualization/RATreeDrawer.py +34 -2
- duckdb_kernel/visualization/lib/__init__.py +53 -0
- duckdb_kernel/visualization/lib/plotly-3.0.1.min.js +3879 -0
- duckdb_kernel/visualization/lib/ra.css +3 -0
- duckdb_kernel/visualization/lib/ra.js +55 -0
- {jupyter_duckdb-1.2.101.dist-info → jupyter_duckdb-1.2.103.dist-info}/METADATA +13 -12
- {jupyter_duckdb-1.2.101.dist-info → jupyter_duckdb-1.2.103.dist-info}/RECORD +19 -15
- {jupyter_duckdb-1.2.101.dist-info → jupyter_duckdb-1.2.103.dist-info}/WHEEL +1 -1
- duckdb_kernel/magics/StringWrapper.py +0 -3
- {jupyter_duckdb-1.2.101.dist-info → jupyter_duckdb-1.2.103.dist-info}/top_level.txt +0 -0
duckdb_kernel/db/Connection.py
CHANGED
|
@@ -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}'
|