-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: add support for Ruby ActiveRecord #749
Conversation
Adds basic tests and translations that are needed for Ruby ActiveRecord.
Codecov Report
@@ Coverage Diff @@
## postgresql-dialect #749 +/- ##
========================================================
+ Coverage 86.32% 89.81% +3.48%
- Complexity 1914 2383 +469
========================================================
Files 122 131 +9
Lines 6216 7942 +1726
Branches 849 1141 +292
========================================================
+ Hits 5366 7133 +1767
+ Misses 605 564 -41
Partials 245 245
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@palladius FYI |
@@ -0,0 +1,18 @@ | |||
// Copyright 2022 Google LLC |
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.
nits: 2022 -> 2023
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.
Done
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.
Generally, LGTM. Why do we need a mock server just for ruby/active record? Can't we have one for all cases?
Thanks for the view. We have a specific mock server for Ruby/ActiveRecord, but it is based on the generic mock server that we have for other tests: pgadapter/src/test/java/com/google/cloud/spanner/pgadapter/ruby/AbstractRubyMockServerTest.java Line 47 in ef17dba
The reason that we have a specific one for Ruby is that the Ruby driver will execute some specific queries either when a new connection is created, or when specific methods are executed on the driver (e.g. it will check for the existence of specific types the first time those types are used). We keep these specific queries in separate mock servers per driver/ecosystem. We for example also have a similar setup for .NET, as the .NET driver also executes specific queries when some data types are used. |
Adds experimental support for Ruby ActiveRecord 7.x. This PR adds: