4950 Commits

Author SHA1 Message Date
Charles Leifer bd0e434e83 4.0.3 4.0.3 2026-03-26 17:39:18 -05:00
Charles Leifer 89f3031dac Use psycopg3 if psycopg2 is not installed.
Fixes #3036
2026-03-26 17:36:15 -05:00
Charles Leifer 007fd50bc7 Just some housekeeping 2026-03-25 08:20:06 -05:00
Charles Leifer eda231b047 Update changelog, fix failing crdb sql test. 2026-03-24 21:32:12 -05:00
Charles Leifer 071d0a0362 Cleanup cruft in sql and merge it into appropriate cases. 2026-03-24 21:13:44 -05:00
Charles Leifer ab9a94311d Test cleanup in prefetch 2026-03-24 20:21:16 -05:00
Charles Leifer 2d20c8acb4 Updates to tests, gone through model_sql and cleaned-up. 2026-03-24 09:55:48 -05:00
Charles Leifer c8c09caad7 First pass cleaning up models.py 2026-03-23 19:28:51 -05:00
Charles Leifer 5f222d661e Fixup some tests that were being flaky, reorg 2026-03-23 14:09:54 -05:00
Charles Leifer c604a4513f Manual cleanup in manytomany tests. 2026-03-23 08:31:54 -05:00
Charles Leifer 3caa2f8089 Go through fields tests, cleaning up and consolidating. 2026-03-23 08:26:08 -05:00
Charles Leifer bb529fa0bb Manual cleanup and organization of db_tests w/new gap coverage.
Clean up some of the assertions, merge some tests.
2026-03-23 08:04:50 -05:00
Charles Leifer b323fc5903 Gap coverage - needs review. 2026-03-22 22:02:18 -05:00
Charles Leifer 7de1497f18 Add a couple new tests for pure SQL generation identified as gaps. 2026-03-22 16:51:20 -05:00
Charles Leifer d8c15c3c57 Some more high-level cleanup after AI reorg. 2026-03-22 16:17:10 -05:00
Charles Leifer 2165fbbdce Start working through the reorganized code, cleaning it up. 2026-03-22 14:53:30 -05:00
Charles Leifer 5451f8f2a8 New tests for schema and result verification. 2026-03-22 11:04:00 -05:00
Charles Leifer 44bf2d9129 Add comments to base models explaining usages. 2026-03-22 10:53:23 -05:00
Charles Leifer 4073c2d490 New tests covering some existing gaps. 2026-03-22 10:44:23 -05:00
Charles Leifer c17dc048fb New tests for model_sql to cover some gaps. 2026-03-22 10:25:00 -05:00
Charles Leifer 6418faf6ce Reorganization within larger modules. 2026-03-22 10:12:54 -05:00
Charles Leifer 17cc2f54a6 Reorganize classes within modules (fields and models). 2026-03-22 09:59:52 -05:00
Charles Leifer 4a3e6e82a8 Start reordering. 2026-03-22 09:42:31 -05:00
Charles Leifer b1196c8ac9 Comments for sections to serve as anchors for reorganization. 2026-03-22 09:40:24 -05:00
Charles Leifer 95e95fae8c Test reorg. 2026-03-21 21:26:37 -05:00
Charles Leifer 4e08dd7b69 Avoid specifying both base and config to pydantic. 2026-03-20 16:48:02 -05:00
Charles Leifer 8e7a37f300 Allow specifying a custom base class when using to_pydantic
Refs #3034
2026-03-20 16:36:57 -05:00
Charles Leifer 3abb8c8aaa Support generator as a multi-type. 2026-03-19 08:26:56 -05:00
Charles Leifer a5d96e57c2 Slightly faster row construction 2026-03-17 20:49:51 -05:00
Charles Leifer 21ea54a2cc Add a few more SQL generation and field-type tests.
Also fix a locking issue that came up w/serverside when running tests
against psycopg3.
2026-03-17 20:33:28 -05:00
Charles Leifer 8ed29c0e47 Clean up window aliasing, add some test coverage that was missing. 2026-03-17 18:37:46 -05:00
Charles Leifer 6f8fd5a67a Deduplication and ensuring valid identifiers in cursor wrappers.
Also increase coverage on some of these where it was missing.
2026-03-17 10:14:51 -05:00
Charles Leifer f58c096d52 Avoid .get() for instance value lookup and fall-thru to keyerror 2026-03-17 07:29:31 -05:00
Charles Leifer 6dc705288d Couple very small perf improvements in model construction / querying 2026-03-17 07:01:15 -05:00
Charles Leifer cff004942a Test to ensure dict first result wins 2026-03-17 06:34:18 -05:00
Charles Leifer 3728d7da3e Pre-compute expensive graph reachability in process-row.
Couple other small optimizations to reduce python operations too.
2026-03-16 22:51:11 -05:00
Charles Leifer a7c6cb7c5d Better-behaved FOR UPDATE, correctly handle skip locked + of. 2026-03-16 22:33:12 -05:00
Charles Leifer b5353a33c8 Fix join graph resolution when intermediary models are empty/null.
This resolves a kinda long-standing ambiguity when you select across
joins using left outer and the models further out may be all null, or
only the intermediary ones may be.
2026-03-16 18:34:49 -05:00
Charles Leifer e031a55b42 Only do pk lookup when we have an auto-field in get().
Also correct ManyToMany docs to show proper default for clear_existing=.
2026-03-16 08:09:40 -05:00
Charles Leifer fa3b3b8e89 Add some missing examples to api doc. 2026-03-16 08:02:45 -05:00
Charles Leifer aa59f6e036 Ensure avoid SQLi in timezone, add'l tests.
Also add docs to ModelSelect that were present (slightly different) on
the base Select query. Since the modelselect variants do not accept a
`database` parameter, document these separately to avoid confusion.
2026-03-15 21:49:34 -05:00
Charles Leifer 668baa9eab Allow table constraint test to run on mysql again. 2026-03-15 21:07:19 -05:00
Charles Leifer 0407f59b80 Fix alias-manager not clearing context - harmless but fixed. 2026-03-15 20:48:05 -05:00
Charles Leifer 7c43127ba1 Only specify no default values flag for models, not joining dicts.
Also fixes failing test, pg wants boolean expression.
2026-03-15 19:59:12 -05:00
Charles Leifer 40091beade Ensure bitwise negation is supported on bitfield. 2026-03-15 16:00:49 -05:00
Charles Leifer 3b86345dbb Ensure fk to bigauto uses bigint.
Previously BigAuto was not a subclass, when it changed this check needed
to change, too.
2026-03-15 15:51:03 -05:00
Charles Leifer a285042db7 4.0.2 4.0.2 2026-03-15 10:45:07 -05:00
Charles Leifer e7b3091681 More idiomatic usage in doc examples. 2026-03-15 10:35:43 -05:00
Charles Leifer 7f85343a7b Fix misnamed method in examples. 2026-03-15 10:34:11 -05:00
Charles Leifer c505a13523 Update flaky tests that were relying on async callback ordering. 2026-03-14 22:07:47 -05:00