Skip to content

feat: support nullable search fields with postgres transforms#470

Merged
wschurman merged 1 commit intomainfrom
wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms
Feb 27, 2026
Merged

feat: support nullable search fields with postgres transforms#470
wschurman merged 1 commit intomainfrom
wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms

Conversation

@wschurman
Copy link
Member

@wschurman wschurman commented Feb 26, 2026

Why

#468 added nulls support for regular order bys, but explicitly disabled it for search pagination due to it adding quite a lot of complexity. It also fixed a bug where using a nullable field in pagination in general would break the cursor condition and omit rows (any tuple containing NULL would be dropped due to postgres behavior).

But applications still need to be able to search fields that are nullable, they just need to provide a mechanism for dictating how to cast them as non-nullable. This PR provides such a mechanism.

How

Allow the user to specify a function to craft the search field SQLFragment from nullable fields. This is required to be a somewhat awkward shape since the library needs to retain control over the field name due to table aliasing in the cursor.

Test Plan

Run new tests.

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@018a40b). Learn more about missing BASE report.
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main      #470   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?       110           
  Lines           ?     16135           
  Branches        ?      1440           
========================================
  Hits            ?     16135           
  Misses          ?         0           
  Partials        ?         0           
Flag Coverage Δ
integration 23.86% <99.33%> (?)
unittest 95.03% <66.66%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wschurman wschurman changed the base branch from main to graphite-base/470 February 26, 2026 19:51
@wschurman wschurman force-pushed the wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms branch from eab00ee to b1772ac Compare February 26, 2026 19:51
@wschurman wschurman changed the base branch from graphite-base/470 to wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods February 26, 2026 19:51
@wschurman wschurman force-pushed the wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms branch from b1772ac to 2aebbfa Compare February 26, 2026 21:06
@wschurman wschurman force-pushed the wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods branch from 83e68a2 to fa3ac1e Compare February 26, 2026 22:10
@wschurman wschurman force-pushed the wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms branch from 2aebbfa to 85b1a4c Compare February 26, 2026 22:10
@wschurman wschurman requested review from ide and quinlanj February 26, 2026 22:23
@wschurman wschurman marked this pull request as ready for review February 26, 2026 22:23
Copy link
Member Author

wschurman commented Feb 27, 2026

Merge activity

  • Feb 27, 2:15 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 27, 2:16 AM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 27, 2:19 AM UTC: @wschurman merged this pull request with Graphite.

@wschurman wschurman changed the base branch from wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods to graphite-base/470 February 27, 2026 02:15
@wschurman wschurman changed the base branch from graphite-base/470 to main February 27, 2026 02:15
@wschurman wschurman force-pushed the wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms branch from 85b1a4c to b2d3e62 Compare February 27, 2026 02:16
@wschurman wschurman merged commit 53b0604 into main Feb 27, 2026
3 checks passed
@wschurman wschurman deleted the wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms branch February 27, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants