-
Notifications
You must be signed in to change notification settings - Fork 10
DBAL3: Implement getServerVersion(), forwarding to PDOCrateDB
#158
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
|
Warning Rate limit exceeded@amotl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 50 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
WalkthroughReplaces manual DSN/platform setup with a DSN-driven DriverManager connection in the example, updates the driver to implement VersionAwarePlatformDriver, changes PDOConnection::getServerVersion to delegate to the underlying connection, and adds two tests asserting server version retrieval. Changes
Sequence Diagram(s)sequenceDiagram
participant Example as examples/objects.php
participant DsnParser as DsnParser
participant DriverMgr as DriverManager
participant Connection as DBAL Connection
participant PDOConn as PDOCrate\PDOConnection
participant Native as Native CrateDB Conn
participant SchemaMgr as SchemaManager
Note over Example,DsnParser: New DSN-driven connection flow
Example->>DsnParser: parse(crate://...)
DsnParser-->>Example: options
Example->>DriverMgr: getConnection(options)
DriverMgr-->>Connection: returns DBAL Connection (with CratePlatform4)
Connection->>PDOConn: wraps native connection
PDOConn->>Native: getServerVersion() (delegated)
Connection->>SchemaMgr: create SchemaManager(connection)
SchemaMgr->>SchemaMgr: drop/create schema
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related issues
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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 |
33f4799 to
d89797a
Compare
| // Retrieve server version. | ||
| $serverVersion = $this->_conn->getNativeConnection()->getServerVersion(); | ||
| $this->assertTrue( | ||
| version_compare($serverVersion, '0.0.0', '>='), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When could it be 0.0.0? Like why not asserting that it must be > '0.0.0'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, thanks. CodeRabbit's suggestion also isn't too bad, so I've just used it right away, see 3d0a784.
04a9e9d to
3d0a784
Compare
seut
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!
3d0a784 to
7f2228c
Compare
7f2228c to
93c12f7
Compare
About
getServerVersion()was a dummy before, now it's real.Detail
However, one is still advised to select the platform manually. I didn't find any connection between
getServerVersion()and the platform selection process -- there isn't any.References