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