forcedotcom / phoenix

BSD 3-Clause "New" or "Revised" License
558 stars 227 forks source link

Allow BOOLEAN type to represent NULL #611

Open jtaylor-sfdc opened 10 years ago

jtaylor-sfdc commented 10 years ago

As we support BOOLEAN as a first-class citizen data type, we should have a way to serialize/deserialize a NULL value. This will prevent us from having to coerce it back and forth to a DECIMAL when indexed and allow it to be used as a nullable column anywhere in the primary key constraint. We'd need to add a PDataType.isNullable() instead of relying on PDataType.isFixedWidth() to infer whether a nullable column is allowed in the middle of a primary key constraint.

jtaylor-sfdc commented 10 years ago

One way we can implement this in a backward compatible manner: