Skip to content

Commit 86cc802

Browse files
authored
fix(query builder): correct edge cases and typing of query builder (#250)
Usages updates & bug fixes
1 parent d7f3a76 commit 86cc802

File tree

102 files changed

+3655
-4721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+3655
-4721
lines changed

.gemini/bootstrap.md

Lines changed: 101 additions & 19 deletions
Large diffs are not rendered by default.

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ jobs:
106106
run: uv sync --all-extras --dev
107107

108108
- name: Test
109-
run: uv run pytest -n 2 --dist=loadgroup
109+
env:
110+
PYTHONFAULTHANDLER: "1"
111+
PYTEST_ADDOPTS: "--max-worker-restart=0 -s"
112+
run: timeout 900s uv run pytest -n 2 --dist=loadgroup
110113

111114
# test-windows:
112115
# runs-on: windows-latest

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: mixed-line-ending
1818
- id: trailing-whitespace
1919
- repo: https://github.com/charliermarsh/ruff-pre-commit
20-
rev: "v0.14.5"
20+
rev: "v0.14.6"
2121
hooks:
2222
- id: ruff
2323
args: ["--fix"]
@@ -40,7 +40,7 @@ repos:
4040
- id: slotscheck
4141
exclude: "docs|.github"
4242
- repo: https://github.com/sphinx-contrib/sphinx-lint
43-
rev: "v1.0.1"
43+
rev: "v1.0.2"
4444
hooks:
4545
- id: sphinx-lint
4646
args: ["--jobs", "1"]

AGENTS.md

Lines changed: 164 additions & 3606 deletions
Large diffs are not rendered by default.

docs/examples/quickstart/quickstart_5.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import pytest
44

5+
pytestmark = pytest.mark.xdist_group("postgres")
6+
57
__all__ = ("test_quickstart_5",)
68

79

docs/examples/usage/usage_configuration_1.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
def test_sqlite_memory_db() -> None:
5+
from rich import print
56

67
# start-example
78
from sqlspec import SQLSpec
@@ -15,6 +16,7 @@ def test_sqlite_memory_db() -> None:
1516

1617
# Use the database
1718
with db_manager.provide_session(db) as session:
18-
result = session.execute("SELECT 1")
19+
value = session.select_value("SELECT 1")
20+
print(value)
1921
# end-example
20-
assert result[0] == {"1": 1}
22+
assert value == 1

docs/examples/usage/usage_configuration_10.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import pytest
2+
3+
pytestmark = pytest.mark.xdist_group("postgres")
4+
15
__all__ = ("test_manual_pool",)
26

37

docs/examples/usage/usage_configuration_12.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import pytest
2+
3+
pytestmark = pytest.mark.xdist_group("postgres")
4+
15
__all__ = ("test_basic_statement_config",)
26

37

docs/examples/usage/usage_configuration_19.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
"""Test configuration example: Binding multiple database configurations."""
22

3+
import pytest
4+
5+
pytestmark = pytest.mark.xdist_group("postgres")
6+
37
__all__ = ("test_binding_multiple_configs",)
48

59

docs/examples/usage/usage_configuration_20.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
"""Test configuration example: Named database bindings."""
22

3+
import pytest
4+
5+
pytestmark = pytest.mark.xdist_group("postgres")
6+
37
__all__ = ("test_named_bindings",)
48

59

0 commit comments

Comments
 (0)