Open dickermoshe opened 2 months ago
Good point! Changing this would be breaking, but IMO it would make things easier if create
/ Companion.insert
only requires a value wrapper if the column is nullable and has a default.
How queezy are you about breaking releases? Would you make one just for this?
Not just for this, but having one for all breaking enhancement could be worth it.
The reason I'm holding back on breaking releases is that with macros coming up eventually, we'll probably have some major design changes on how tables are defined - I don't want to do to two breaking releases in short succession (from experience, it takes actual years until we stop getting issues for outdated major versions).
Since this only affects the generator, I think we can introduce a builder option as an opt-in. In a future major release, we make this the default (e.g. an opt-out) or the only generation mode.
Nullable Columns Without Defaults
Why does this column need to be constructed with a
Value
e.g.create(title:Value("Pizza"))
It can be empty because a
withDefault
orclientDefault
wasn't provided. SoValue.empty()
has the exact same effect asnull
.