MFDataSchema Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | MFDataSchema.h MFDataSchema.m |
Overview
The MFDataSchema class is a local representation of schema persisted to the Mesosfer cloud. This is the main class that is used to interact with objects in your app.
bucket
Specifies the bucket name of schema.
@property (strong, nonatomic, readonly, nullable) NSString *bucketDeclared In
MFDataSchema.h
columns
Specifies the list of MFColumn of schema.
@property (strong, nonatomic, readonly, nonnull) NSArray<MFColumn*> *columnsDeclared In
MFDataSchema.h
+ schemaWithObjectId:NS_SWIFT_NAME:
Creates a reference to an existing MFDataSchema for use in creating associations between MFDataSchemas.
+ (nonnull instancetype)schemaWithObjectId:(nonnull NSString *)objectId NS_SWIFT_NAMEParameters
objectId |
The object id for the referenced |
|---|
Return Value
A new instance object without data.
Discussion
Warning: You need to call MFDataSchema.fetchAsyncWithBlock: to fetch object from Mesosfer cloud.
See Also
Declared In
MFDataSchema.h
– dictionary
Gets all key and value pair of MFData object in a dictionary.
- (nullable NSDictionary *)dictionaryReturn Value
The dictionary of all key and value pair object.
Declared In
MFDataSchema.h
– addColumnWithName:andType:
Adds a schema column with name and MFObjectType.
- (nonnull instancetype)addColumnWithName:(nonnull NSString *)name andType:(MFObjectType)typeParameters
name |
The name of column. |
|---|---|
type |
The |
Return Value
The current instance of schema. This allow method chaining.
Declared In
MFDataSchema.h
– deleteColumnWithName:
Deletes a schema column with name.
- (nonnull instancetype)deleteColumnWithName:(nonnull NSString *)nameParameters
name |
The name of column. |
|---|
Return Value
The current instance of schema. This allow method chaining.
Declared In
MFDataSchema.h
– fetchAsyncWithBlock:
Fetch the current MFDataSchema data from Mesosfer cloud asynchronously and executes the given callback block.
- (void)fetchAsyncWithBlock:(nullable MFDataSchemaResultBlock)blockParameters
block |
The block to execute. It shoud have the following argument signature: |
|---|
Declared In
MFDataSchema.h
– saveAsyncWithBlock:
Saves the MFDataSchema asynchronously and executes the given callback block.
- (void)saveAsyncWithBlock:(nullable MFBooleanResultBlock)blockParameters
block |
The block to execute. It should have the following argument signature: |
|---|
Declared In
MFDataSchema.h
– deleteAsyncWithBlock:
Delete the MFDataSchema object in Mesosfer cloud asynchronously and executes the given callback block.
- (void)deleteAsyncWithBlock:(nullable MFBooleanResultBlock)blockParameters
block |
The block to execute. It should have the following argument signature: |
|---|
Declared In
MFDataSchema.h