tigrbl_engine_xlsx 0.1.1.dev7__tar.gz → 0.1.1.dev9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tigrbl_engine_xlsx
3
- Version: 0.1.1.dev7
3
+ Version: 0.1.1.dev9
4
4
  Summary: XLSX engine plugin for tigrbl where each workbook is a database and each sheet is a table.
5
5
  Project-URL: Homepage, https://github.com/swarmauri/swarmauri-sdk
6
6
  Author-email: Jacob Stewart <jacob@swarmauri.com>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tigrbl_engine_xlsx"
7
- version = "0.1.1.dev7"
7
+ version = "0.1.1.dev9"
8
8
  description = "XLSX engine plugin for tigrbl where each workbook is a database and each sheet is a table."
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -34,4 +34,5 @@ dev = [
34
34
  "pytest>=8.0.0",
35
35
  "pytest-asyncio>=0.24.0",
36
36
  "sqlalchemy>=2.0",
37
+ "ruff>=0.11.0",
37
38
  ]
@@ -2,11 +2,19 @@ from .engine import WorkbookCatalog, XlsxEngine, xlsx_capabilities, xlsx_engine
2
2
  from .session import XlsxSession
3
3
 
4
4
 
5
+ class _Registration:
6
+ def build(self, *, mapping, spec, dsn):
7
+ return xlsx_engine(mapping=mapping, spec=spec, dsn=dsn)
8
+
9
+ def capabilities(self, *, spec, mapping=None):
10
+ return xlsx_capabilities()
11
+
12
+
5
13
  def register() -> None:
6
14
  """Entry-point hook invoked by tigrbl to register this engine."""
7
15
  from tigrbl.engine.registry import register_engine
8
16
 
9
- register_engine("xlsx", build=xlsx_engine, capabilities=xlsx_capabilities)
17
+ register_engine("xlsx", _Registration())
10
18
 
11
19
 
12
20
  __all__ = [
@@ -150,6 +150,30 @@ class XlsxSession(TigrblSessionBase):
150
150
  out = fn(self)
151
151
  return await out if hasattr(out, "__await__") else out
152
152
 
153
+ async def begin(self) -> None:
154
+ await self._tx_begin_impl()
155
+
156
+ async def commit(self) -> None:
157
+ await self._tx_commit_impl()
158
+
159
+ async def rollback(self) -> None:
160
+ await self._tx_rollback_impl()
161
+
162
+ async def flush(self) -> None:
163
+ await self._flush_impl()
164
+
165
+ async def refresh(self, obj: Any) -> None:
166
+ await self._refresh_impl(obj)
167
+
168
+ async def get(self, model: type, ident: Any) -> Any | None:
169
+ return await self._get_impl(model, ident)
170
+
171
+ async def execute(self, stmt: Any) -> Any:
172
+ return await self._execute_impl(stmt)
173
+
174
+ async def close(self) -> None:
175
+ await self._close_impl()
176
+
153
177
  async def _tx_begin_impl(self) -> None:
154
178
  self._snap.clear()
155
179
  self._snap_ver.clear()