thoth-dbmanager 0.4.9__py3-none-any.whl → 0.4.10__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.
@@ -75,7 +75,7 @@ class SQLitePlugin(DbPlugin):
75
75
  # Handle database path resolution
76
76
  database_path = kwargs.get('database_path')
77
77
  database_name = kwargs.get('database_name')
78
-
78
+
79
79
  if not database_path and database_name:
80
80
  # Create database path from name and root path
81
81
  db_root = Path(self.db_root_path)
@@ -83,22 +83,23 @@ class SQLitePlugin(DbPlugin):
83
83
  db_dir.mkdir(parents=True, exist_ok=True)
84
84
  database_path = str(db_dir / f"{database_name}.db")
85
85
  kwargs['database_path'] = database_path
86
-
87
- # Set database path for adapter
86
+
87
+ # Set database path for adapter - ensure we use the provided database_path
88
88
  self.database_path = database_path
89
-
90
- # Initialize with updated kwargs
91
- super().initialize(**kwargs)
92
-
93
- # Set up database directory path and ID
89
+
90
+ # Set up database directory path and ID before calling super().initialize()
94
91
  if database_name:
95
92
  self.db_id = database_name
96
93
  else:
97
94
  # Extract database name from path
98
- self.db_id = Path(database_path).stem
99
-
100
- self._setup_directory_path(self.db_id)
101
-
95
+ self.db_id = Path(database_path).stem if database_path else None
96
+
97
+ if self.db_id:
98
+ self._setup_directory_path(self.db_id)
99
+
100
+ # Initialize with updated kwargs - this will create and connect the adapter
101
+ super().initialize(**kwargs)
102
+
102
103
  logger.info(f"SQLite plugin initialized for database: {self.db_id} at {self.database_path}")
103
104
 
104
105
  def _setup_directory_path(self, db_id: str) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thoth_dbmanager
3
- Version: 0.4.9
3
+ Version: 0.4.10
4
4
  Summary: A Python library for managing SQL databases with support for multiple database types, LSH-based similarity search, and a modern plugin architecture.
5
5
  Author-email: Marco Pancotti <mp@tylconsulting.it>
6
6
  Project-URL: Homepage, https://github.com/mptyl/thoth_dbmanager
@@ -29,11 +29,11 @@ thoth_dbmanager/plugins/mariadb.py,sha256=ElYa4Rexwrofcjcs0UQKan8fZpbU6-n9zghYR9
29
29
  thoth_dbmanager/plugins/mysql.py,sha256=mbDsIDV2H_BWYANU4JHMsUkxLQICuGtjKTTPbig2Ngs,16546
30
30
  thoth_dbmanager/plugins/oracle.py,sha256=k4Yxvz5MdsH3Sfty9lxbhr8igSnHvGbGujz3bLpNcHo,5230
31
31
  thoth_dbmanager/plugins/postgresql.py,sha256=pI1W9oHpQty8tHMoEDcsOT-Msv6S4aoFcArOGFxLR7Q,5518
32
- thoth_dbmanager/plugins/sqlite.py,sha256=iMlOH4XMEY-Ac3yrs1HzjKaR4km1DxLDwAEjGZzM0Cc,6504
32
+ thoth_dbmanager/plugins/sqlite.py,sha256=0rGbmY4YTmFs426Dl6smAr6ATQj5jW86re5G1mWgocY,6632
33
33
  thoth_dbmanager/plugins/sqlserver.py,sha256=mMb3F5FmSWV02FZwj-Ult-2TjuyeVA4Fl1iME1dbgLU,5289
34
34
  thoth_dbmanager/plugins/supabase.py,sha256=mWlaGAdpywx4-pU4Ffpmn24ze8sg0sM5kc6bFDoeYRg,8645
35
- thoth_dbmanager-0.4.9.dist-info/licenses/LICENSE,sha256=81-BOzGgwtY1XdYfkwMQB87AkOGXI9OMq0kjNcZA4UE,1071
36
- thoth_dbmanager-0.4.9.dist-info/METADATA,sha256=tdNXYo8QmI9els7dgE97lrb9X1-kHacvW3cl4MI4uZo,12246
37
- thoth_dbmanager-0.4.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- thoth_dbmanager-0.4.9.dist-info/top_level.txt,sha256=b9ttxm9RUc0KUCASEKRx6FqoREYJ1-KZWSpNuaM0uQ4,16
39
- thoth_dbmanager-0.4.9.dist-info/RECORD,,
35
+ thoth_dbmanager-0.4.10.dist-info/licenses/LICENSE,sha256=81-BOzGgwtY1XdYfkwMQB87AkOGXI9OMq0kjNcZA4UE,1071
36
+ thoth_dbmanager-0.4.10.dist-info/METADATA,sha256=7dpnzyb1Gem7JrA5N_aEx97-vC3c5bLXYa1N1fIWWoA,12247
37
+ thoth_dbmanager-0.4.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ thoth_dbmanager-0.4.10.dist-info/top_level.txt,sha256=b9ttxm9RUc0KUCASEKRx6FqoREYJ1-KZWSpNuaM0uQ4,16
39
+ thoth_dbmanager-0.4.10.dist-info/RECORD,,