SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Implemented `NULL` literal in SQL for `Unit`s and `Option`s

Open egormanga opened this issue 2 months ago • 0 comments

Description of Changes

Ability to, given a table:

#[table(name=table)]
struct Table {
	option: Option<i32>,
}

do:

INSERT INTO table (option) VALUES (Null);

instead of getting:

Error: Unsupported literal expression: NULL

API and ABI breaking changes

None.

Expected complexity level and risk

2:

Existing code, just extended it to support another SqlLiteral variant.

Testing

  • [x] Manual testing
  • [ ] Unit tests

egormanga avatar Nov 07 '25 23:11 egormanga