-
Notifications
You must be signed in to change notification settings - Fork 55
1.x #717
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
Conversation
Handling not null spatial column in the existing data
Move out of block
Add random order query
|
Caution Review failedThe pull request is closed. WalkthroughIntroduces random ordering support across query, validation, SQL adapters, and tests; adds adapter capability probe getSupportForOptionalSpatialAttributeWithExistingRows() and implements per-adapter responses; adjusts MySQL exception mapping; tweaks Adapter transaction rollback error dispatch flow; and adds spatial behavior tests. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant Query
participant Database
participant SQLAdapter as SQL Adapter
participant RDBMS as DB Engine
Client->>Query: Query::orderRandom()
Client->>Database: find(collection, [orderRandom, ...])
Database->>SQLAdapter: build+execute SELECT
SQLAdapter->>SQLAdapter: detect ORDER_RANDOM
SQLAdapter->>SQLAdapter: getRandomOrder() -> RAND()/RANDOM()
SQLAdapter->>RDBMS: SELECT ... ORDER BY RAND()/RANDOM()
RDBMS-->>SQLAdapter: rows
SQLAdapter-->>Database: documents
Database-->>Client: result set
sequenceDiagram
autonumber
participant App as Caller
participant Adapter
participant PDO as PDO Connection
App->>Adapter: withTransaction(fn, retries)
Adapter->>PDO: BEGIN
Adapter->>Adapter: execute user callback
alt error during callback
Adapter->>PDO: ROLLBACK (try)
PDO-->>Adapter: result or error
note over Adapter: Post-rollback exception dispatch moved\noutside inner try-catch
Adapter->>App: rethrow/mapped exception
else success
Adapter->>PDO: COMMIT
Adapter-->>App: result
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Bug Fixes
Tests