Skip to content

fix: Add operations to ColumnSerializable - #5354

Open
mackings wants to merge 1 commit into
serverpod:mainfrom
mackings:fix/column-serializable-operations
Open

mackings wants to merge 1 commit into
serverpod:mainfrom
mackings:fix/column-serializable-operations

Conversation

@mackings

@mackings mackings commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

This adds the standard column operations to ColumnSerializable.

ColumnSerializable can now use the same comparison API as the other nullable columns:

column.equals(null)
column.notEquals(null)
column.equals(value)
column.notEquals(value)
column.inSet(values)
column.notInSet(values)

Non-null values are serialized before they are used in the SQL expression, so list, map, set, and model values keep the same JSON encoding behavior used elsewhere.

Fixes #1591.

Tests

From packages/serverpod_database:

dart analyze
dart test

Both passed locally with Dart 3.10.3.

I also ran a small smoke check for the missing behavior:

1. Serializable list is not null:
"vouchers"."usersIdsAlreadyUsed" IS NOT NULL

2. Serializable object is null:
"vouchers"."metadata" IS NULL

3. Serializable list equals a value:
"vouchers"."tags" = '["active","paid"]'

Pre-launch Checklist

  • I read the Contribute page and followed the process outlined there for submitting PRs.
  • This update contains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
  • I read and followed the Dart Style Guide and formatted the code with dart format.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
  • I added new tests to check the change I am making.
  • All existing and new tests are passing.
  • Any breaking changes are documented below.

If you need help, consider asking for advice on the discussion board.

Breaking changes

None.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mackings mackings changed the title fix: add operations to ColumnSerializable fix: Add operations to ColumnSerializable Jun 17, 2026
@mackings

mackings commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

The title check is green now. Could someone take a look when you have time?

@mackings

Copy link
Copy Markdown
Contributor Author

Is this still something you'd like in Serverpod? Happy to update it or close it if not.

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.

ColumnSerializable implementation is incomplete

1 participant