Constructor
new Schema(className)
Parameters:
Name | Type | Description |
---|---|---|
className |
String
|
Parse Class string. |
Methods
(static) all(options) → {Promise}
Static method to get all schemas
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
Valid options are:
|
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
addArray(name) → {Parse.Schema}
Adding Array Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
addBoolean(name) → {Parse.Schema}
Adding Boolean Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
addDate(name) → {Parse.Schema}
Adding Date Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
addField(name, type) → {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
|
TheCan be a (String|Number|Boolean|Date|Parse.File|Parse.GeoPoint|Array|Object|Pointer|Parse.Relation) |
addFile(name) → {Parse.Schema}
Adding File Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
addGeoPoint(name) → {Parse.Schema}
Adding GeoPoint Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
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) → {Parse.Schema}
Adding Number Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
addObject(name) → {Parse.Schema}
Adding Object Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
addPointer(name, targetClass) → {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 |
addPolygon(name) → {Parse.Schema}
Adding Polygon Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
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) → {Parse.Schema}
Adding String Field
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
delete(options) → {Promise}
Removing a Schema from Parse Can only be used on Schema without objects
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
Valid options are:
|
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
deleteField(name, targetClass) → {Parse.Schema}
Deleting a Field to Update on a Schema
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
targetClass |
String
|
Name of the target Pointer Class |
deleteIndex(name, targetClass) → {Parse.Schema}
Deleting an Index to Update on a Schema
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Name of the field that will be created on Parse |
targetClass |
String
|
Name of the target Pointer Class |
get(options) → {Promise}
Get the Schema from Parse
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
Valid options are:
|
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(options) → {Promise}
Create a new Schema on Parse
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
Valid options are:
|
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.
update(options) → {Promise}
Update a Schema on Parse
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
Valid options are:
|
Returns:
- Type:
-
Promise
A promise that is resolved with the result when the query completes.