-
Notifications
You must be signed in to change notification settings - Fork 532
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
Refine implicit relationships #1446
base: v0-11-dev
Are you sure you want to change the base?
Commits on Sep 19, 2023
-
deps: Add MySQL to CI workflow (#1398)
- also add dependabot workflow - also standardize rails/ruby version quoting/ordering
Configuration menu - View commit details
-
Copy full SHA for be970f4 - Browse repository at this point
Copy the full SHA be970f4View commit details -
fix: Reliably quote columns/tables (#1400)
* refactor: easily quote table/column * refactor: extract table name when missing * fix: Reliably quote columns/tables * refactor: putting quoting methods together * Handle special case of * - tests * fix: hack mysql test query comparison
Configuration menu - View commit details
-
Copy full SHA for 896459c - Browse repository at this point
Copy the full SHA 896459cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1da2cb7 - Browse repository at this point
Copy the full SHA 1da2cb7View commit details -
fix: test the adapter-specific query ordering (#1402)
* fix: test the adapter-specific query ordering * test: make order independent * test: sort order-dependent response * test: skip failing mysql tests as ok for now
Configuration menu - View commit details
-
Copy full SHA for f2bcba9 - Browse repository at this point
Copy the full SHA f2bcba9View commit details -
V0.11 refactor resource classes to modules (#1406)
* Restore previous include directives behavior * Default sort use _primary_key * Remove support for pluck attributes * Pass relationship instead of relationship name * Update copyright date * Ignore docker-compose override files * add _relation_name method * Rework resource class to support using modules for retrieving resources by way of a `resource_retrieval_strategy` Removes BasicResource class and replaces ActiveRelationResource with a module * Use `_relationship` helper method * Add ActiveRelationRetrieval Allows retrieval of resources by querying the primary table and joining the source table - the opposite of the v10 version * Skip extra pluck queries when not caching a resource * Test Cleanup * Adjust tested query counts based on default_resource_retrieval_strategy * create_implicit_polymorphic_type_relationships * Add ActiveRelationRetrievalV09 * Move resource down in the load order * Use underscore instead of downcase * Refactor Resource to load retrieval strategy as class loads * Simplify loading resource retrieval strategy modules Add SimpleResource that does not load a resource retrieval strategy module * Remove no longer need deferred_relationship code * Add warning about potentially unused `records_for_populate` * Rework loading the resource_retrieval_strategy to fix issue in real projects * Use SortedSets for resource_identities * Add sorted_set gem * Remove rails 5 support
Configuration menu - View commit details
-
Copy full SHA for 01ba9a0 - Browse repository at this point
Copy the full SHA 01ba9a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c70bd4c - Browse repository at this point
Copy the full SHA c70bd4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f69096 - Browse repository at this point
Copy the full SHA 2f69096View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac46d89 - Browse repository at this point
Copy the full SHA ac46d89View commit details
Commits on Sep 26, 2023
-
Restore
use_related_resource_records_for_joins
for v0_10 (#1412)* Restore `use_related_resource_records_for_joins` for v0_10 * Handle nil actual hashes * Add back join_options for v10 compatibility * Test JoinManager not JoinManagerV10 * Use sql_for_compare to account for different sql dialect quoating
Configuration menu - View commit details
-
Copy full SHA for 8932a6d - Browse repository at this point
Copy the full SHA 8932a6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for bdce601 - Browse repository at this point
Copy the full SHA bdce601View commit details
Commits on Oct 27, 2023
-
fix: more reliable check of module is included (#1418)
handle gems like GraphQL which override `include?` ``` rake aborted! ArgumentError: wrong number of arguments (given 1, expected 3) gems/graphql-2.0.13/lib/graphql/schema/directive.rb:58:in `include?' ```
Configuration menu - View commit details
-
Copy full SHA for 81e4ecf - Browse repository at this point
Copy the full SHA 81e4ecfView commit details
Commits on Nov 1, 2023
-
Fix tests for V0.11 and Rails 7.1 (#1420)
* Cleanup table definitions for Rails 7.1 * Test helper move require 'rails/test_help' * Test helper add `config.hosts` * Update test matrix to add rails 7.1 and remove ruby 2.6 Note: ruby 2.7 is also EOL, but I'm choosing to continue testing 2.7 for now
Configuration menu - View commit details
-
Copy full SHA for 26d280a - Browse repository at this point
Copy the full SHA 26d280aView commit details
Commits on Nov 16, 2023
-
Namespace references to Rails using
::Rails
to avoid conflicts with… (#1421) * Namespace references to Rails using `::Rails` to avoid conflicts with other gems * Use uppercase JSONAPI module name
Configuration menu - View commit details
-
Copy full SHA for 1bdacf1 - Browse repository at this point
Copy the full SHA 1bdacf1View commit details
Commits on Jan 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ef0551d - Browse repository at this point
Copy the full SHA ef0551dView commit details
Commits on Jan 11, 2024
-
Make SortedSet for identity arrays optional (#1427)
* Make SortedSet for identity arrays optional * Fix tests to use sort_related_identities_by_primary_key option override * Keep SortedSet as a development dependency, unless required * Remove sorted_set dependency * Add better messaging about using SortedSet * Clarify setting sort_criteria for includes vs. related resources
Configuration menu - View commit details
-
Copy full SHA for 040f980 - Browse repository at this point
Copy the full SHA 040f980View commit details
Commits on Jan 13, 2024
-
Store the resource_klass and id in an array for efficiency (#1428)
Removes the need to allocate a new array for every comparison
Configuration menu - View commit details
-
Copy full SHA for cd1a529 - Browse repository at this point
Copy the full SHA cd1a529View commit details
Commits on Jan 16, 2024
-
Rework ResourceIdentity <=> operator (#1430)
add tests for ResourceIdentity, including that comparison does not allocate memory
Configuration menu - View commit details
-
Copy full SHA for 0bbbc0b - Browse repository at this point
Copy the full SHA 0bbbc0bView commit details -
* Reduce number of string allocations in LinkBuilder * Consistently access `include_related` * Remove unused class variable * Cache `id` after retrieving it from the model * Cache `module_path` * Cache resource_klass_for and resource_type_for * Remove no longer used method _setup_relationship * Delete nil values without creating a new object * Rework resource naming for method caches
Configuration menu - View commit details
-
Copy full SHA for 2668b6b - Browse repository at this point
Copy the full SHA 2668b6bView commit details
Commits on Jan 17, 2024
-
fix: allow multiple resource relation retrieval methods (#1425)
* fix: check if relation retrieval in included via included_modules * require 'jsonapi/relation_retrieval' * feat: raise when cannot include different retrieval strategy * test: multiple retrieval strategies --------- Co-authored-by: lgebhardt <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9f436b5 - Browse repository at this point
Copy the full SHA 9f436b5View commit details
Commits on Jan 19, 2024
-
refactor: separate polymorphic functions (#1433)
* refactor: lookup polymorphic types only once * refactor: polymorphic lookups to utility module * refactor: separate polymorphic functions * Refactor into PolymorphicTypesLookup --------- Co-authored-by: lgebhardt <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 76ef777 - Browse repository at this point
Copy the full SHA 76ef777View commit details
Commits on Jan 22, 2024
-
feat: teach JR in tests to parse the response (#1437)
* feat: teach JR in tests to parse the response * use response.parsed_body instead of JSON.parse when evaluating responses in tests --------- Co-authored-by: lgebhardt <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f193a35 - Browse repository at this point
Copy the full SHA f193a35View commit details -
chore: address deprecations (#1436)
* chore(deprecation): test_fixture= has been deprecated in favor of tests_fixtures= * chore(deprecations): ActiveSupport::Deprecation.silenced ``` ActiveSupport::Deprecation is deprecated and will be removed from Rails (use Rails.application.deprecators.silenced= instead) ``` * chore(deprecation): prefer ActiveSupport.deprectator or our own deprecator. since https://github.com/rails/rails/pull/47354/files
Configuration menu - View commit details
-
Copy full SHA for 51c9592 - Browse repository at this point
Copy the full SHA 51c9592View commit details -
fix: format model polymorphic type from resource object type (#1435)
* test: failing request posting sti with polymorphic has one * fix: polymorphic resource assignment * Add polymorphic_type_for method * Favor classify over singularize.camelize --------- Co-authored-by: lgebhardt <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 311b1fe - Browse repository at this point
Copy the full SHA 311b1feView commit details
Commits on Jan 24, 2024
-
fix: railtie to use correct load hook (#1438)
* chore: fix file typo * fix: railtie to use correct load hook
Configuration menu - View commit details
-
Copy full SHA for e4c9707 - Browse repository at this point
Copy the full SHA e4c9707View commit details
Commits on Jan 25, 2024
-
fix: more flexible polymorphic types lookup (#1434)
* fix: more flexible polymorphic types lookup * test: add polymorphic lookup tests they pass on v-11-dev I'm going to look into the existing lookup warnings now ``` [POLYMORPHIC TYPE NOT FOUND] No polymorphic types found for fileable [POLYMORPHIC TYPE] No polymorphic types found for FilePropertiesResource fileable [POLYMORPHIC TYPE NOT FOUND] No polymorphic types found for respondent [POLYMORPHIC TYPE] No polymorphic types found for QuestionResource respondent [POLYMORPHIC TYPE NOT FOUND] No polymorphic types found for respondent [POLYMORPHIC TYPE] No polymorphic types found for AnswerResource respondent [POLYMORPHIC TYPE NOT FOUND] No polymorphic types found for keepable [POLYMORPHIC TYPE] No polymorphic types found for KeeperResource keepable ``` * Revert "test: add polymorphic lookup tests" This reverts commit 0979a7243b6bc816dd2327d3ff23f70209c52dce. * feat: easily clear the lookup * feat: add a descendents strategy * test: polymorphic type lookup * feat: make polymorphic type lookup configurable * feat: clear polymorphic lookup after initialize
Configuration menu - View commit details
-
Copy full SHA for ae9017b - Browse repository at this point
Copy the full SHA ae9017bView commit details
Commits on Jan 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c529c23 - Browse repository at this point
Copy the full SHA c529c23View commit details -
Polymorphic types override per relationship (#1440)
* Add warning about disabling eager loading * Fix overriding polymorphic types on a relationship
Configuration menu - View commit details
-
Copy full SHA for f75acdb - Browse repository at this point
Copy the full SHA f75acdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07888a9 - Browse repository at this point
Copy the full SHA 07888a9View commit details
Commits on Jan 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cccd332 - Browse repository at this point
Copy the full SHA cccd332View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7084ffa - Browse repository at this point
Copy the full SHA 7084ffaView commit details