fix: massive tests, fixed query param and filter minor bugs #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the Supabase PostgREST library, focusing on enhanced query building, filter processing, and integration testing. Key changes include the addition of helper functions for headers and query parameters, extended support for complex filter conditions, refactored query-building logic, and comprehensive integration tests to ensure robust functionality.
Enhancements to filter processing:
lib/supabase/postgrest/filter_builder.ex: Added support for new operators (between,is,in, etc.) and improved handling of complex filter combinations, such as nested conditions and array modifiers.test/supabase/postgrest/filter_builder_test.exs: Introduced extensive test coverage for edge cases, additional operators, and integration scenarios to validate the behavior of theprocess_conditionfunction.Refactoring query-building logic:
lib/supabase/postgrest/query_builder.ex: Refactoredinsertandupsertmethods to streamline conflict handling and header/query parameter construction using helper functions. Addedmaybe_add_conflict_queryfor cleaner conflict query management. [1] [2]Addition of helper functions:
lib/supabase/postgrest/helpers.ex: Introducedget_headerandget_query_paramutility functions for extracting values from headers and query lists, improving code readability and reducing duplication.lib/supabase/postgrest/transform_builder.ex: IntegratedHelpers.get_headerto simplify header processing in transform operations. [1] [2]Comprehensive integration tests:
test/supabase/postgrest/integration_test.exs: Added integration tests to validate complex query chains, transformations, foreign table operations, edge cases, and method-specific behaviors, ensuring the library's reliability in real-world scenarios.