litedbmodel-runtime 2.2.3__tar.gz → 2.2.4__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 (35) hide show
  1. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/PKG-INFO +1 -1
  2. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/__init__.py +1 -1
  3. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime.egg-info/PKG-INFO +1 -1
  4. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/pyproject.toml +1 -1
  5. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_orm_bench_native.py +16 -14
  6. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/README.md +0 -0
  7. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/connection_routing.py +0 -0
  8. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/dialect.py +0 -0
  9. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/driver.py +0 -0
  10. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/errors.py +0 -0
  11. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/exec_context.py +0 -0
  12. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/grouping.py +0 -0
  13. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/leaves.py +0 -0
  14. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/middleware.py +0 -0
  15. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime/tx_options.py +0 -0
  16. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime.egg-info/SOURCES.txt +0 -0
  17. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime.egg-info/dependency_links.txt +0 -0
  18. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime.egg-info/requires.txt +0 -0
  19. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/litedbmodel_runtime.egg-info/top_level.txt +0 -0
  20. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/setup.cfg +0 -0
  21. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_conformance_corpus.py +0 -0
  22. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_connection_routing.py +0 -0
  23. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_connection_routing_livedb.py +0 -0
  24. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_consumes_bc_core.py +0 -0
  25. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_dialect.py +0 -0
  26. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_dynamic_where.py +0 -0
  27. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_exec_context.py +0 -0
  28. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_grouping.py +0 -0
  29. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_hard_limit_guard.py +0 -0
  30. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_middleware.py +0 -0
  31. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_middleware_livedb.py +0 -0
  32. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_render.py +0 -0
  33. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_transaction_boundary.py +0 -0
  34. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_tx_boundary_livedb.py +0 -0
  35. {litedbmodel_runtime-2.2.3 → litedbmodel_runtime-2.2.4}/tests/test_tx_options.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: litedbmodel-runtime
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: Thin multi-language runtime for litedbmodel v2 SCP makeSQL bundles (Python port). Executes the published static-makeSQL artifacts (a read ReadGraph = a bc surrogate ComponentGraphIR + per-node static statement templates, or a gate-first TransactionPlan) against a SQL driver — semantics-identical to the TS reference. Delegates the Expression-IR evaluation + map/Φ/wiring orchestration to behavior-contracts.
5
5
  Author: foo-ogawa
6
6
  License: MIT
@@ -104,7 +104,7 @@ from .connection_routing import (
104
104
  )
105
105
  from .leaves import make_handlers, render_placeholders
106
106
 
107
- __version__ = "2.2.3"
107
+ __version__ = "2.2.4"
108
108
 
109
109
  __all__ = [
110
110
  "__version__",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: litedbmodel-runtime
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: Thin multi-language runtime for litedbmodel v2 SCP makeSQL bundles (Python port). Executes the published static-makeSQL artifacts (a read ReadGraph = a bc surrogate ComponentGraphIR + per-node static statement templates, or a gate-first TransactionPlan) against a SQL driver — semantics-identical to the TS reference. Delegates the Expression-IR evaluation + map/Φ/wiring orchestration to behavior-contracts.
5
5
  Author: foo-ogawa
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "litedbmodel-runtime"
7
- version = "2.2.3"
7
+ version = "2.2.4"
8
8
  description = "Thin multi-language runtime for litedbmodel v2 SCP makeSQL bundles (Python port). Executes the published static-makeSQL artifacts (a read ReadGraph = a bc surrogate ComponentGraphIR + per-node static statement templates, or a gate-first TransactionPlan) against a SQL driver — semantics-identical to the TS reference. Delegates the Expression-IR evaluation + map/Φ/wiring orchestration to behavior-contracts."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -47,7 +47,7 @@ def test_every_op_executes(harness):
47
47
  assert len(OPS) == 19
48
48
  for op in OPS:
49
49
  seed(driver) # clean fixture per op (writes mutate)
50
- assert run_op(fns, driver, op, 0) is not None or op in ("delete",) # every op runs, returns a value
50
+ assert run_op(fns, driver, "sqlite", op, 0) is not None or op in ("delete",) # every op runs, returns a value
51
51
 
52
52
 
53
53
  # ── reads + relations ─────────────────────────────────────────────────────────
@@ -55,10 +55,12 @@ def test_every_op_executes(harness):
55
55
 
56
56
  def test_find_ops_return_expected_rows(harness):
57
57
  driver, fns = harness
58
- assert len(run_op(fns, driver, "findAll", 0)) == 100 # the op's LIMIT 100 over the seed SSoT
59
- unique = run_op(fns, driver, "findUnique", 0)
60
- assert len(unique) == 1 and unique[0]["email"] == "user1@example.com"
61
- assert len(run_op(fns, driver, "findFirst", 0)) == 1
58
+ assert len(run_op(fns, driver, "sqlite", "findAll", 0)) == 100 # the op's LIMIT 100 over the seed SSoT
59
+ unique = run_op(fns, driver, "sqlite", "findUnique", 0)
60
+ # The declared input for this op (benchmark/crosslang/contract.ts) the row the fixture is built
61
+ # to answer and the row the ORM-vs-ORM column reads.
62
+ assert len(unique) == 1 and unique[0]["email"] == "user500@example.com"
63
+ assert len(run_op(fns, driver, "sqlite", "findFirst", 0)) == 1
62
64
 
63
65
 
64
66
  def test_nested_relations_hydrate_children(harness):
@@ -67,11 +69,11 @@ def test_nested_relations_hydrate_children(harness):
67
69
  # first contiguous run of posts, and that post's comments are the first contiguous run of comments.
68
70
  # The fan-out itself is the fixture's, which the scale knob varies (#170), so the assertion pins the
69
71
  # SHAPE — the empty-children bug (#150) still fails it, a re-scaled fixture does not.
70
- users = run_op(fns, driver, "nestedFindAll", 0)
72
+ users = run_op(fns, driver, "sqlite", "nestedFindAll", 0)
71
73
  by_id = {u["id"]: u for u in users}
72
74
  posts = by_id[1]["posts"]
73
75
  assert posts and [p["title"] for p in posts] == [f"Post {i}" for i in range(1, len(posts) + 1)]
74
- deep = run_op(fns, driver, "nestedRelations", 0)
76
+ deep = run_op(fns, driver, "sqlite", "nestedRelations", 0)
75
77
  u1 = next(u for u in deep if u["id"] == 1)
76
78
  comments = u1["posts"][0]["comments"] # 3-level chain
77
79
  assert comments and [c["id"] for c in comments] == list(range(1, len(comments) + 1))
@@ -79,7 +81,7 @@ def test_nested_relations_hydrate_children(harness):
79
81
 
80
82
  def test_composite_relations_group_by_full_tuple(harness):
81
83
  driver, fns = harness
82
- tenants = run_op(fns, driver, "compositeRelations", 0)
84
+ tenants = run_op(fns, driver, "sqlite", "compositeRelations", 0)
83
85
  tu1 = next(t for t in tenants if t["user_id"] == 1)
84
86
  posts = tu1["posts"]
85
87
  # post_id / comment_id RESTART per tenant, so tenant 1 user 1 owns post_ids 1..n and post 1 owns
@@ -95,14 +97,14 @@ def test_composite_relations_group_by_full_tuple(harness):
95
97
  def test_single_writes_persist(harness):
96
98
  driver, fns = harness
97
99
  # create: INSERT (write, no returning) → one-row summary; the row persists.
98
- summary = run_op(fns, driver, "create", 7)
100
+ summary = run_op(fns, driver, "sqlite", "create", 7)
99
101
  assert summary[0]["changes"] == 1
100
102
  assert any(r["email"] == "new7@bench.com" for r in _users(driver))
101
103
  # update: SET name WHERE id=1 → summary; the row is updated.
102
- run_op(fns, driver, "update", 0)
104
+ run_op(fns, driver, "sqlite", "update", 0)
103
105
  assert driver.prepare("SELECT name FROM benchmark_users WHERE id=1").all([])[0]["name"] == "Updated 1"
104
106
  # upsert: INSERT ... ON CONFLICT DO UPDATE RETURNING id (existing email) → the RETURNING row.
105
- returning = run_op(fns, driver, "upsert", 0)
107
+ returning = run_op(fns, driver, "sqlite", "upsert", 0)
106
108
  assert returning[0]["id"] == 1 # user1 conflict-updated, RETURNING its id
107
109
  assert driver.prepare("SELECT name FROM benchmark_users WHERE id=1").all([])[0]["name"] == "Upserted One"
108
110
 
@@ -112,10 +114,10 @@ def test_single_writes_persist(harness):
112
114
 
113
115
  def test_batch_writes_apply_all_rows(harness):
114
116
  driver, fns = harness
115
- run_op(fns, driver, "createMany", 0) # 10 fresh rows
117
+ run_op(fns, driver, "sqlite", "createMany", 0) # 10 fresh rows
116
118
  emails = {r["email"] for r in _users(driver)}
117
119
  assert all(f"many0_{i}@bench.com" in emails for i in range(10))
118
- run_op(fns, driver, "updateMany", 0) # keyed on id 1..10
120
+ run_op(fns, driver, "sqlite", "updateMany", 0) # keyed on id 1..10
119
121
  assert driver.prepare("SELECT name FROM benchmark_users WHERE id=1").all([])[0]["name"] == "Many 1"
120
122
 
121
123
 
@@ -124,7 +126,7 @@ def test_batch_writes_apply_all_rows(harness):
124
126
 
125
127
  def test_nested_create_tx_persists_user_and_post(harness):
126
128
  driver, fns = harness
127
- run_op(fns, driver, "nestedCreate", 3) # INSERT user RETURNING id → INSERT post(author_id=id)
129
+ run_op(fns, driver, "sqlite", "nestedCreate", 3) # INSERT user RETURNING id → INSERT post(author_id=id)
128
130
  user = driver.prepare("SELECT id FROM benchmark_users WHERE email='nc3@bench.com'").all([])
129
131
  assert len(user) == 1
130
132
  posts = driver.prepare("SELECT title FROM benchmark_posts WHERE author_id=?").all([user[0]["id"]])