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.
@@ -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}'
@@ -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