Constructor
new ParseSchema(className)
Parameters:
Name | Type | Description |
---|---|---|
className |
String
|
Parse Class string. |
Methods
(static) all() → {Promise}
Static method to get all schemas
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
addArray(name, options) → {Parse.Schema}
Adding Array Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addBoolean(name, options) → {Parse.Schema}
Adding Boolean Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addDate(name, options) → {Parse.Schema}
Adding Date Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addField(name, type, options) → {Parse.Schema}
Adding a Field to Create / Update a Schema
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
type |
String
|
Can be a (String|Number|Boolean|Date|Parse.File|Parse.GeoPoint|Array|Object|Pointer|Parse.Relation) |
options |
Object
|
Valid options are:
|
addFile(name, options) → {Parse.Schema}
Adding File Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addGeoPoint(name, options) → {Parse.Schema}
Adding GeoPoint Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addIndex(name, type) → {Parse.Schema}
Adding an Index to Create / Update a Schema
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
type |
String
|
Can be a (String|Number|Boolean|Date|Parse.File|Parse.GeoPoint|Array|Object|Pointer|Parse.Relation) |
addNumber(name, options) → {Parse.Schema}
Adding Number Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addObject(name, options) → {Parse.Schema}
Adding Object Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addPointer(name, targetClass, options) → {Parse.Schema}
Adding Pointer Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
targetClass |
String
|
Name of the target Pointer Class |
options |
Object
|
See addField |
addPolygon(name, options) → {Parse.Schema}
Adding Polygon Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
addRelation(name, targetClass) → {Parse.Schema}
Adding Relation Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
targetClass |
String
|
Name of the target Pointer Class |
addString(name, options) → {Parse.Schema}
Adding String Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
options |
Object
|
See addField |
delete() → {Promise}
Removing a Schema from Parse Can only be used on Schema without objects
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
deleteField(name) → {Parse.Schema}
Deleting a Field to Update on a Schema
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field |
deleteIndex(name) → {Parse.Schema}
Deleting an Index to Update on a Schema
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field |
get() → {Promise}
Get the Schema from Parse
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
purge() → {Promise}
Removes all objects from a Schema (class) in Parse. EXERCISE CAUTION, running this will delete all objects for this schema and cannot be reversed
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
save() → {Promise}
Create a new Schema on Parse
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
setCLP(clp) → {Parse.Schema}
Sets Class Level Permissions when creating / updating a Schema. EXERCISE CAUTION, running this may override CLP for this schema and cannot be reversed
Parameters:
Name | Type | Description |
---|---|---|
clp |
Object
|
Class Level Permissions |
update() → {Promise}
Update a Schema on Parse
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.