Expand description
Type inference, name validation, and default columns.
Upstream: getType and getObjectType (SchemaController.js:1555-1640), plus
classNameIsValid and fieldNameIsValid (:446-480).
Inference is what makes Parse’s schema implicit: the first write that mentions a field decides its type forever. Everything downstream, including the error a client sees on the second write, follows from getting this exactly right.
Constants§
- DEFAULT_
COLUMNS - The four columns every class has (
defaultColumns._Default). - SYSTEM_
CLASSES - Classes Parse defines itself.
- USER_
COLUMNS - The additional default columns of
_User(defaultColumns._User).
Functions§
- class_
name_ is_ valid - Is this a class a client may address?
- field_
name_ is_ valid - Field names a client may not use at all.
- field_
name_ is_ valid_ for_ class - Additionally refuses the default columns, which a client cannot redefine.
- infer_
type - Infer a field type from a value, as
getTypedoes. - schema_
mismatch - The
INCORRECT_TYPEa client sees when a write disagrees with the stored type.