effect-app / libs

The core libraries to build apps with Effect
45 stars 7 forks source link

Refine nullable fields to non nullable when the query confirms it #87

Closed patroza closed 3 weeks ago

patroza commented 1 month ago

like https://github.com/effect-ts-app/libs/commit/4ab14def7441d084e8ff09db2db18b0473842cc0 but for where("x", "neq", null)

jfet97 commented 1 month ago

Should where("x", "neq", null) filter out undefined too?

patroza commented 1 month ago

Should where("x", "neq", null) filter out undefined too?

no, undefined and null are not the same and undefined is generally not a state we support in the storage model on the type level. only for just in time migrations, but are then filled by the database via config.defaultValues (e.g defaultValues: { x: null } will make a neq or eq for null hit, even when the field doesn't exist)

jfet97 commented 3 weeks ago

would be handled by #105