-
Notifications
You must be signed in to change notification settings - Fork 55
Extract query lib #823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
abnegate
wants to merge
289
commits into
main
Choose a base branch
from
feat-query-lib
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Extract query lib #823
Changes from 9 commits
Commits
Show all changes
289 commits
Select commit
Hold shift + click to select a range
9744868
(chore): simplify PHPStan config and remove baseline
abnegate bbe2cb0
(feat): add Event enum to replace string event constants
abnegate 98e1474
(feat): add Lifecycle hook interface for database events
abnegate 8b638ef
(feat): add QueryTransform hook interface for SQL query modification
abnegate 5106488
(feat): add Async trait for parallel database operations
abnegate 7ea6ef2
(feat): add query validators for aggregation, distinct, group by, hav…
abnegate 28a886e
(test): add e2e test scopes for aggregation and join queries
abnegate d722b94
(refactor): remove local CursorDirection and OrderDirection enums in …
abnegate e12b5c2
(refactor): remove Mongo RetryClient in favor of built-in retry handling
abnegate 92160fe
(refactor): use import alias for base Exception class and add docblocks
abnegate aa16406
(docs): add class-level docblocks to all exception subclasses
abnegate 4b59b42
(refactor): improve ID helper with import alias and enhanced docblocks
abnegate ebbb5c9
(refactor): improve Role helper with import alias and enhanced docblocks
abnegate ff0175b
(refactor): improve Permission helper with enhanced docblocks
abnegate 5d04b1a
(refactor): update DateTime helper with improved type safety
abnegate 016a6ba
(refactor): update Connection class with improved docblocks
abnegate 72460e2
(refactor): update PDO wrapper with improved type safety
abnegate 5629360
(docs): add docblocks to enum and model classes
abnegate 21cb52d
(feat): extend OperatorType enum with new cases and docblocks
abnegate 54ca313
(refactor): change Operator method from string to OperatorType enum
abnegate 314edd0
(refactor): remove backward compat constants and add aggregation/join…
abnegate 38d9ec9
(refactor): improve Document type safety with PHPStan annotations and…
abnegate 9879391
(refactor): improve Attribute model with PHPStan type annotations
abnegate c01b969
(refactor): improve Index model with PHPStan type annotations
abnegate 672ac4c
(refactor): improve Relationship model with PHPStan type annotations
abnegate 6528c41
(refactor): update adapter feature interfaces with docblocks and type…
abnegate cf22762
(refactor): replace string-based event system with Event enum and Que…
abnegate 29c7ac7
(refactor): overhaul SQL adapter with query builder integration and t…
abnegate b9b58e2
(refactor): update MariaDB adapter for query lib integration
abnegate db306e5
(refactor): update MySQL adapter for query lib integration
abnegate 382e89d
(refactor): update Postgres adapter for query lib integration
abnegate e8f5f64
(refactor): update SQLite adapter for query lib integration
abnegate ff015e9
(refactor): update Mongo adapter for query lib integration
abnegate bcc08e4
(refactor): update Pool adapter with typed delegates and query transf…
abnegate be9d715
(refactor): update Read, Write, and WriteContext hooks with docblocks
abnegate bab6d2d
(refactor): update permission hooks with type safety improvements
abnegate d4cbda7
(refactor): update tenant hooks with type safety improvements
abnegate 5e03323
(refactor): update relationship hooks with type safety and docblocks
abnegate dd29e18
(refactor): replace event/listener system with Lifecycle hooks and si…
abnegate 49598d6
(refactor): update Attributes trait for typed objects and Event enum
abnegate 730d706
(refactor): update Collections trait for typed objects and Event enum
abnegate bf24dd0
(refactor): update Databases trait for Event enum
abnegate fd148e9
(refactor): update Documents trait for typed objects, Event enum, and…
abnegate cc64fb9
(refactor): update Indexes trait for typed objects and Event enum
abnegate 9e9a526
(refactor): update Relationships trait for typed objects and Event enum
abnegate 7280fd0
(docs): add docblock to Transactions trait
abnegate 098e5e3
(refactor): update Mirror class for Lifecycle hooks and Event enum
abnegate d02398a
(refactor): update Mirroring Filter with type safety improvements
abnegate 02a8b44
(refactor): update query validators with type safety and docblocks
abnegate 2601f52
(refactor): update Attribute validator to use typed Attribute objects
abnegate 10d348f
(refactor): update Index validators to use typed objects
abnegate 85324a8
(refactor): update Operator validator for OperatorType enum
abnegate b41d2e2
(refactor): update Structure validators with type safety
abnegate aa7ef09
(refactor): update Queries validators with type safety and docblocks
abnegate c67dea4
(refactor): update Authorization validator with docblocks
abnegate 9a86037
(refactor): update remaining validators with type safety and docblocks
abnegate f843e23
(test): update Operator tests for OperatorType enum changes
abnegate a18e4c5
(test): update Query tests for removed backward compat constants
abnegate fca7473
(test): update Document tests for type safety changes
abnegate 445dbce
(test): update ID test import
abnegate b44043e
(test): update Attribute validator tests
abnegate e01d4bb
(test): update Index validator tests for typed objects
abnegate f6f9081
(test): update Structure validator tests
abnegate a7c3aa5
(test): update Query and Documents query validator tests
abnegate 258ae8e
(test): update remaining unit validator tests
abnegate 26946ce
(test): update e2e base adapter test class
abnegate 9939205
(test): update Collection e2e tests for typed objects and Event enum
abnegate 1b85a53
(test): update Document e2e tests for type safety changes
abnegate 7b10d06
(test): update Attribute e2e tests
abnegate 5d9fe92
(test): update Index e2e tests for typed objects
abnegate 6a0f624
(test): update Spatial e2e tests for query lib changes
abnegate bb32e93
(test): update Relationship e2e tests for typed objects and Event enum
abnegate abbc77e
(test): update remaining e2e test scopes
abnegate 1e702a2
(test): update SQL adapter e2e test configurations
abnegate 1054409
(test): update MongoDB e2e test configurations
abnegate ebedcd2
(test): update Mirror e2e tests for Lifecycle hooks
abnegate 62576d8
(test): update Pool adapter e2e test
abnegate 4ecbe6f
(test): update SharedTables e2e test configurations
abnegate 79cb0c2
(fix): resolve PHPStan errors in Mirror and Queries validator
abnegate 577d710
(feat): add Collection model with toDocument/fromDocument
abnegate 299c2e5
(feat): add optimistic locking with auto-incrementing document version
abnegate 99b8eea
(feat): add rawQuery escape hatch and full-text search relevance scoring
abnegate 73fc17e
(fix): add finally blocks for shared tables test cleanup and skip ten…
abnegate c993582
(feat): add ORM entity mapping with PHP 8.4 attributes and unit of work
abnegate 2da66f8
(feat): add custom type registry, repository pattern, and specifications
abnegate 5e5df73
(feat): add database seeding with factories, fixtures, and dependency…
abnegate 43ad9e8
(feat): add typed domain events with PSR-14 compatible dispatcher
abnegate dd2a8d8
(feat): add second-level query cache with region config and auto-inva…
abnegate 47a3d89
(feat): add eager/lazy loading with batch resolution and N+1 detection
abnegate d97d4e5
(feat): add query profiler with slow query detection and adapter inst…
abnegate 18b3359
(feat): add fluent QueryBuilder exposing full utopia-php/query builde…
abnegate 453878f
(feat): add schema introspection, migrations, and zero-downtime strat…
abnegate 3c3640a
(feat): add read/write pool adapter with replica routing and sticky c…
abnegate fe5cc74
(test): add 301 unit tests for ORM, types, repository, seeder, events…
abnegate c7cc7ae
(feat): integrate utopia-php/query with performance optimizations and…
abnegate 79e4c10
(test): refactor test suite with unit test coverage and PHPUnit 12 at…
abnegate 8d002e0
(chore): upgrade to PHPUnit 12 and PHP 8.4
abnegate 474f215
(fix): resolve SQLite execute override and Mirror constructor initial…
abnegate 21d6c20
(test): restore e2e coverage and close unit test gaps for full covera…
abnegate c5d25bb
(fix): clone fixture documents to prevent test state leakage and re-c…
abnegate b078980
(fix): revert spatial Query::covers to Query::contains for cross-adap…
abnegate 64b671e
Merge remote-tracking branch 'origin/main' into feat-query-lib
abnegate a6949b8
fix: add async library checkout to CI and regenerate composer.lock
abnegate 980a619
fix: switch to VCS repos for query/async and simplify CI
abnegate d21d4ce
fix: resolve lint errors, add PHPStan baseline for max level, remove …
abnegate 8d235cd
fix: resolve test failures for CacheKey, ORM entities, and Collection…
abnegate 15d8eed
fix: resolve adapter test failures across all databases
abnegate f86a80d
fix: wrap user:x removal in try/finally and relax testGetDocumentSelect
abnegate 6b8203f
fix: resolve cursor validation, Pool stale transforms, MySQL timeout,…
abnegate 23fd044
fix: make test fixtures idempotent for paratest functional mode
abnegate a99ad70
fix: revert PermissionTests fixture and Documents.php NotFoundExcepti…
abnegate 9815a9f
fix: use UUID collection names for paratest isolation and fix test or…
abnegate 042aa09
fix: resolve Console class namespace, SharedTables update detection, …
abnegate a55ef9d
fix: narrow internal key skip list to only system-managed keys
abnegate 9f57454
fix: use unique collection names in aggregation, relationship, and Sh…
abnegate 94b44f9
fix: add PHPStan type annotation for createdProductCollections array
abnegate 79eaeb4
fix: SharedTables multi-tenant cleanup and Pool timeout propagation
abnegate f558e40
fix: Pool setTimeout state tracking and MySQL timeout dirty flag
abnegate 4de656f
fix: use docker stop instead of docker kill for Redis-Destructive tests
abnegate 582d2cb
fix: reconnect cache after Redis restart in destructive tests
abnegate 98a4fa8
fix: address review — add missing syncReadHooks in Mongo and tenant g…
abnegate 93d3108
fix: replace slow waitForRedis polling with direct reconnect
abnegate be5a1f8
fix: set read_timeout on Redis reconnect and use instant docker stop
abnegate f08deea
fix: remove redundant testCacheReconnect, already covered by utopia-p…
abnegate 617cf69
fix: replace docker-based Redis test with mock, remove Redis-Destruct…
abnegate 9107f2f
Selective startup
abnegate ed945f0
fix: use docker-compose profiles to only start needed services per CI…
abnegate 08c10f2
fix: keep xdebug.so in image, restore volume mount
abnegate 2150f9b
fix: disable xdebug in CI with XDEBUG_MODE=off
abnegate 4767099
refactor: break SQLite inheritance from MariaDB, use Feature interfaces
abnegate 25b1fe2
fix: add relationship guards for SQLite, fix lint issues
abnegate 9ccb3e1
fix: add remaining relationship guards, make Pool implement Features
abnegate 13a60f0
fix: update PHPStan baseline, remove redundant instanceof checks
abnegate 1f65132
fix: correct malformed datetime test value
abnegate f952c28
fix: use ISO datetime format in test, MySQL rejects text format
abnegate 5a53446
refactor: promote shared methods from concrete adapters to SQL.php
abnegate 476aef4
fix: align spatial method signatures, fix import ordering
abnegate 7be2b74
feat: expose schema builder, rename BuildResult to Plan, add permissi…
abnegate 141df88
(chore): update lock
abnegate a99e777
(feat): unified addHook API, Decorator/Interceptor/Permissions/Tenanc…
abnegate ab86d6f
(fix): remove parse error from dangling statement and inline assignme…
abnegate a51656c
(fix): accept any PDO-compatible object in SQL adapter constructor
abnegate 3006ceb
(fix): use object type for PDO parameter
abnegate 57b4d17
(fix): remove DatabasePDO type constraints from SQL adapter
abnegate 0946667
(fix): pass PermissionType enum to getPermissionsByType
abnegate 6a256be
(fix): pass PermissionType enum to Input constructor
abnegate e6d2504
(fix): handle ColumnType::Float in row size calculation
abnegate f51f4a5
(fix): handle ColumnType::Float everywhere alongside Double
abnegate 5efffc0
(fix): restore syncWriteHooks auto-registration for Permissions and T…
abnegate c0f0c20
(fix): pass PermissionType enum to getPermissionsByType in Permission…
abnegate 3f2e0ef
(fix): revert syncWriteHooks - manual registration only for user data…
abnegate d55beb5
(fix): auto-register Permissions hook in syncWriteHooks for all DB in…
abnegate 9ad4baf
(revert): remove auto-registration, back to empty syncWriteHooks
abnegate be29e8e
(fix): sync write hooks from Pool adapter to inner adapter on delegate
abnegate ec959e3
(fix): sync write hooks from Pool only for DML operations, empty sync…
abnegate 4f96135
(fix): normalize order case in Mongo tryFrom calls, add integer seque…
abnegate 03f2ba5
(chore): trigger CI
abnegate 902826b
(fix): update tests to use enum types and new hook API after refactoring
abnegate 68dd174
(fix): pass ColumnType enum to addFormat in AttributeTests
abnegate 7e3f9bc
(fix): restore Permissions write hook in syncWriteHooks, remove globa…
abnegate e1a5cea
(fix): register Permissions hook in test setUp for explicit permissio…
abnegate 516ed26
(fix): restore Tenancy write hook registration in syncWriteHooks for …
abnegate 5fb45e5
(fix): use direct sharedTables/tenant check in newBuilder instead of …
abnegate 49f98ee
(fix): address PR review comments - return type safety, read hook ini…
abnegate 076038e
Merge remote-tracking branch 'origin/main' into feat-query-lib
abnegate 0570e1d
(fix): resolve PHPStan errors and regenerate baseline
abnegate 3a4ded6
(refactor): collapse Hook\Relationship interface into Relationships c…
abnegate 26f0c82
(fix): accept PermissionType or string in Input for custom permission…
abnegate 9074dfa
(fix): remove auto-registration of hooks, let callers register explic…
abnegate 843dce3
(fix): propagate write hooks for singular document operations in Pool…
abnegate 146221a
(fix): propagate write hooks unconditionally in Pool, forward to Mirr…
abnegate 2444fe6
(fix): handle millisecond timestamp strings in Mongo castingBefore
abnegate 89e7afc
(fix): resolve Structure validator missing Float, TenantFilter alias …
abnegate 2c3cc09
(fix): skip structure validation for internal metadata document updates
abnegate a32778b
(fix): include null tenant in MongoDB metadata collection queries
abnegate 87a32dd
(fix): always call castingAfter in createDocument regardless of relat…
abnegate 93b7f4d
(fix): add ColumnType::Float case to Attribute validator
abnegate 84c0c74
(fix): skip decorators during silenced (internal) operations
abnegate c481610
(fix): convert associative arrays to Documents in relationship hooks
abnegate 49e2dea
(fix): use loose comparison for tenant checks and fix PHPStan return …
abnegate ed0b48a
(fix): add PHPStan type assertions for Document constructor calls
abnegate a07ec0e
(fix): restore Document tenant int cast, validate relationship $id, f…
abnegate 999c209
(fix): convert associative arrays to Documents in relationship hooks
abnegate c9a9c7c
(chore): trigger CI
abnegate fa461e5
(fix): normalize tenant types at boundary, restore strict comparison
abnegate cae1e99
(chore): add agent files
abnegate 7140252
(feat): add metadata parameter to createCollection for custom attributes
abnegate 2c49e16
(feat): add externalId attribute to collection metadata schema
abnegate 3fade2e
Merge remote-tracking branch 'origin/main' into feat-query-lib
abnegate 7ab1b83
(chore): resolve merge conflicts with main, keep query-lib adapter ar…
abnegate f720a2b
(chore): pin claude-pr-owner to v0.2.0
abnegate af527e1
Revert "(chore): pin claude-pr-owner to v0.2.0"
abnegate 15e6aa7
Merge branch 'main' into feat-query-lib
abnegate c2b792e
(fix): address review findings — 1 HIGH, 0 MEDIUM
github-actions[bot] eb7fef3
Merge remote-tracking branch 'origin/main' into feat-query-lib
abnegate 2378ab9
Merge branch 'main' into feat-query-lib
abnegate b6198a6
Merge remote-tracking branch 'origin/main' into feat-query-lib
abnegate 997093a
(fix): address review findings — 1 HIGH, 0 MEDIUM
github-actions[bot] ca4e2a7
(fix): CI — define Query::LOGICAL_TYPES/TYPE_ELEM_MATCH, drop Databas…
github-actions[bot] 56e3342
Merge remote-tracking branch 'origin/main' into feat-query-lib
abnegate 6f2fc7f
(fix): address review findings — critical & warning
github-actions[bot] 3f277c1
(fix): CI — emit INSERT IGNORE when skipDuplicates is set in SQL::cre…
github-actions[bot] 78529fe
(fix): CI — propagate skipDuplicates through Database → Adapter → Per…
github-actions[bot] b44c8cd
(fix): CI — bump utopia-php/query pin to include ColumnType::Serial
github-actions[bot] e95c1f8
fix: rename Plan to Statement and Blueprint to Table after query lib …
abnegate 8bfe500
fix: drop redundant Postgres TIMESTAMP qualifier and isolate join-agg…
abnegate 2e24174
chore: bump utopia-php/query to 0.2.0
abnegate d8011fa
Merge branch 'main' into feat-query-lib
abnegate b3206a6
chore: regenerate composer.lock after merge with main
abnegate f8bbaae
fix: extend join-test data isolation to remaining DataProvider tests
github-actions[bot] 1656c9c
(fix): CI — replace removed getSupportForHostname() with supports(Cap…
github-actions[bot] 874ae86
refactor: scrub stale Blueprint/Plan terminology after query-lib rename
github-actions[bot] 514e7e5
(fix): CI — replace removed getSupportForHostname() mock in CacheKeyTest
github-actions[bot] c61d31f
fix: clear PHPStan errors after merge from main
abnegate 936b1df
perf: batch permissions read in afterDocumentBatchUpdate
abnegate e4e2fef
perf: cache DocumentsValidator per collection
abnegate 800dc79
perf: hoist hot-loop guards and cache spatial / map / timeout state o…
abnegate e1756b5
refactor: consolidate find/count/sum binding loops into bindStatement…
abnegate ba8d911
perf: trim find/count/sum redundant work and parse queries once in va…
abnegate 9b60851
fix: purge collection cache on index create/delete and revert timeout…
abnegate 1e64e5a
fix: invalidate spatial cache on rename/updateAttribute paths
github-actions[bot] c87fb80
fix: route Mirror's getDocumentsValidator through source for cache co…
abnegate 7258011
(fix): CI — purge cached DocumentsValidator on index changes
github-actions[bot] d3dae3b
fix: address spatial-cache scoping & per-row alloc warnings
github-actions[bot] e8ba8f4
Merge branch 'main' into feat-query-lib
abnegate d48f975
perf: stop allocating typed Attribute objects in read hot paths
abnegate 4e96d92
style: fix pint no_whitespace_in_blank_line
abnegate aee3c47
fix: address review findings — cache coherence & memory parity
github-actions[bot] 8868c66
refactor: tighten internal-attribute caches and extract isRelationshi…
github-actions[bot] 2f2fc2f
fix(memory): exclude rows when notEqual candidates contain NULL
github-actions[bot] 51ebe32
(fix): CI — apply MySQL session timeout eagerly to stop pool leaks
github-actions[bot] cac5a9a
fix(memory): reconcile adapter signatures with typed Attribute/Index/…
abnegate 1d92a85
fix: null-guard cache key documentId and mongo object filter empty key
abnegate db03f79
ci: add Memory adapter to test matrix
abnegate 72acd76
fix(memory): declare adapter capabilities and per-process test database
abnegate ebe9e64
test(memory): skip no-change update permission optimisation test
abnegate c2bda30
perf(relationships): batch N+1 single-row calls in Relationships hook
abnegate b663a28
perf(database): cache getInternalAttributes() and use Attribute::isRe…
abnegate e8cd9da
perf(adapter): cache Adapter::filter() preg_replace results
abnegate fc1e05e
perf(relationships): pre-index processQueries relationship lookups
abnegate 24710a2
test: structural cache-key tenant assertion in testSetGlobalCollection
abnegate 4ea97af
perf(adapter): cache MariaDB session timeout and add hot-path bypasses
abnegate b662ef9
perf(adapter): skip MariaDB timeout-set branch entirely when never armed
abnegate ef6b8b5
perf(adapter): defer per-query clone in SQL find to join-only path
abnegate 775dd33
perf(relationships): fast-exit hooks when collection has no relations…
abnegate 20c9041
perf(database): tighten decode hot path
abnegate 18c0ca4
perf(database): skip casting for already-canonical types
abnegate 13e4edb
perf(database): inline authorization toggle in find to avoid per-find…
abnegate 01b0c6a
perf(database): inline events-silence toggle in find collection lookup
abnegate c94a5cc
fix(adapter): use per-adapter quote() in fast-path SQL strings
abnegate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.