Skip to content

Conversation

@maxdml
Copy link
Collaborator

@maxdml maxdml commented Nov 12, 2025

Use a special marker __DBOS_NIL to represent nil values in the database instead of storing as NULL.

Copy link
Member

@kraftp kraftp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? What problem is it solving? I thought we decided not to do this. The problem it could solve is UI confusion between nil and empty, but I don't see the code for that here and I'm not even sure it's a problem in Go because Go returns (nil, err) and such.

@maxdml
Copy link
Collaborator Author

maxdml commented Nov 12, 2025

Is this necessary? What problem is it solving? I thought we decided not to do this. The problem it could solve is UI confusion between nil and empty, but I don't see the code for that here and I'm not even sure it's a problem in Go because Go returns (nil, err) and such.

Yeah it just solves the problem of what value gets stored in the database. For the UI, we do return empty strings if nil to the client (it expects empty strings for nil). No impact on the programming model - that's why the serialization tests did not change.

@maxdml maxdml merged commit 6d0f083 into main Nov 12, 2025
3 checks passed
@maxdml maxdml deleted the db-nil-markers branch November 12, 2025 03:14
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.

3 participants