litedbmodel-runtime 2.2.0__tar.gz → 2.2.2__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 (40) hide show
  1. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/PKG-INFO +1 -1
  2. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/__init__.py +1 -1
  3. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/leaves.py +10 -8
  4. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime.egg-info/PKG-INFO +1 -1
  5. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/pyproject.toml +1 -1
  6. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_hard_limit_guard.py +2 -0
  7. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/README.md +0 -0
  8. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/connection_routing.py +0 -0
  9. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/dialect.py +0 -0
  10. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/driver.py +0 -0
  11. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/errors.py +0 -0
  12. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/exec_context.py +0 -0
  13. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/grouping.py +0 -0
  14. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/middleware.py +0 -0
  15. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/relation.py +0 -0
  16. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/runtime.py +0 -0
  17. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/static_bundle.py +0 -0
  18. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime/tx_options.py +0 -0
  19. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime.egg-info/SOURCES.txt +0 -0
  20. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime.egg-info/dependency_links.txt +0 -0
  21. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime.egg-info/requires.txt +0 -0
  22. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/litedbmodel_runtime.egg-info/top_level.txt +0 -0
  23. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/setup.cfg +0 -0
  24. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_conformance_corpus.py +0 -0
  25. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_connection_routing.py +0 -0
  26. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_connection_routing_livedb.py +0 -0
  27. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_consumes_bc_core.py +0 -0
  28. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_dialect.py +0 -0
  29. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_exec_context.py +0 -0
  30. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_grouping.py +0 -0
  31. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_middleware.py +0 -0
  32. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_middleware_livedb.py +0 -0
  33. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_orm_bench_native.py +0 -0
  34. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_parallel_read.py +0 -0
  35. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_render.py +0 -0
  36. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_runtime.py +0 -0
  37. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_transaction_boundary.py +0 -0
  38. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_tx_boundary_livedb.py +0 -0
  39. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/tests/test_tx_isolation.py +0 -0
  40. {litedbmodel_runtime-2.2.0 → litedbmodel_runtime-2.2.2}/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.0
3
+ Version: 2.2.2
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
@@ -124,7 +124,7 @@ from .relation import (
124
124
  )
125
125
  from .leaves import make_handlers
126
126
 
127
- __version__ = "2.2.0"
127
+ __version__ = "2.2.2"
128
128
 
129
129
  __all__ = [
130
130
  "__version__",
@@ -13,7 +13,7 @@ typed-native runners call positionally (``rust/litedbmodel_runtime/src/leaves.rs
13
13
  JSON-encode it for ``json_each``/``JSON_TABLE``, postgres binds the array as-is), and run it through
14
14
  the runtime's central execute/run seam (:func:`exec_context.execute` / :func:`exec_context.run`) on
15
15
  the bound driver — the ONLY driver contact. The OPTIONAL ``guard`` port is the RELATION runaway cap
16
- of a guarded relation child fetch: the raw rows are asserted against it HERE
16
+ of a guarded relation child fetch (absent/None ⇒ uncapped): the raw rows are asserted against it HERE
17
17
  (:meth:`errors.LimitExceededError.check`) because past ``group`` the graph is already nested. A
18
18
  non-returning write returns a one-row ``[{changes, lastInsertRowid}]`` summary so the leaf output
19
19
  shape is uniform (a list of rows).
@@ -34,7 +34,7 @@ from __future__ import annotations
34
34
 
35
35
  import json
36
36
  import re
37
- from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence, Tuple, Union
37
+ from typing import Any, Callable, Dict, List, Mapping, Sequence, Tuple, Union
38
38
 
39
39
  from .driver import Driver
40
40
  from .errors import LimitExceededError, SqlFailure
@@ -81,19 +81,21 @@ def _splice_where(base_sql: str, where_sql: str) -> str:
81
81
 
82
82
 
83
83
  def _effective_statement(ports: Mapping[str, Any]) -> Tuple[str, List[Any]]:
84
- """The ``(sql, params)`` a statement actually executes: the dynamic plan assembled when one is
84
+ """The ``(sql, params)`` a statement actually executes: the dynamic-WHERE plan assembled when one is
85
85
  present, the ports verbatim otherwise.
86
86
 
87
- bc has ALREADY evaluated each fragment's params and its SKIP guard against the input, so a dropped
88
- fragment arrives as ``None``. The survivors join with ``WHERE``/``AND`` and their params bind
89
- BEFORE the base params (the WHERE ``?``s precede the tail's)."""
90
- plan: Optional[Mapping[str, Any]] = ports.get("whereDynamic")
87
+ ``whereDynamic`` is OPTIONAL (absent/None no dynamic WHERE a bounded read, a write, and an
88
+ uncapped fetch omit it; CLAUDE.md §2). bc carries each fragment's SKIP decision as DATA: a skipped
89
+ fragment is PRESENT with ``skipped`` true (never omitted), so assembly DROPS the ``skipped``
90
+ fragments. The survivors join with ``WHERE``/``AND`` and their params bind BEFORE the base params
91
+ (the WHERE ``?``s precede the tail's)."""
91
92
  params: List[Any] = list(ports["params"])
93
+ plan = ports.get("whereDynamic")
92
94
  if plan is None:
93
95
  return ports["sql"], params
94
96
  where_sql = ""
95
97
  where_params: List[Any] = []
96
- for frag in (f for f in (plan.get("frags") or []) if f is not None):
98
+ for frag in (f for f in plan["frags"] if not f["skipped"]):
97
99
  where_sql += (" WHERE " if where_sql == "" else " AND ") + frag["sql"]
98
100
  where_params.extend(frag["params"])
99
101
  return _splice_where(ports["sql"], where_sql), where_params + params
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: litedbmodel-runtime
3
- Version: 2.2.0
3
+ Version: 2.2.2
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.0"
7
+ version = "2.2.2"
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"
@@ -65,6 +65,8 @@ def test_relation_guard_trips_on_the_raw_child_rows():
65
65
  ctx = {"nodeId": "n0", "component": "executeSQL"}
66
66
 
67
67
  def read(guard):
68
+ # `guard` is the OPTIONAL relation cap (absent ⇒ uncapped); `whereDynamic` is likewise omitted
69
+ # on this bounded read — both control ports are present-or-absent per call.
68
70
  ports = {"sql": "SELECT id, v FROM t ORDER BY id", "params": [], "write": False,
69
71
  "returning": False, "bigint": False}
70
72
  if guard is not None: