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 *bucket
Declared In
MFDataSchema.h
columns
Specifies the list of MFColumn
of schema.
@property (strong, nonatomic, readonly, nonnull) NSArray<MFColumn*> *columns
Declared 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_NAME
Parameters
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 *)dictionary
Return 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)type
Parameters
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 *)name
Parameters
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)block
Parameters
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)block
Parameters
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)block
Parameters
block |
The block to execute. It should have the following argument signature: |
---|
Declared In
MFDataSchema.h