Create and Update API
makeClassFromData
Variation-1: Builds a class object from given name, primary key and the data. The class is generated from the data. This is equivalent to generating a class from the data.
MetaApi.makeClassFromData (className, pkAttrName, data)
Parameters
className: name of the class object (string)
pkAttrName: which attribute is the primary key (string)
data: the data hashmap (dictionary)
Returns
A dictionary representation of newly created class
Variation-2: Builds a class object from chosen name, table-name, primary key and attributes. This will give you the option to specify the table name different from the class name.
Object makeClassFromData(className, tableName, pkAttrName, data)
Parameters
className: name of the class object (string)
tableName: name of the table in the database (string)
pkAttrName: which attribute is the primary key (string)
data: the data hashmap (dictionary)
Variation-3: Builds a class object from chosen name, primary key, data and data Types.
makeClassFromData(className, pkAttrName, data, attrTypeByNames)
Parameters
className: name of the class object (string)
tableName: name of the table in the database (string)
pkAttrName: which attribute is the primary key (string)
data: data hashmap (dictionary)
attrTypeByNames: columns types and names (dictionary)
Variation-4: Builds a class object from chosen name, primary key, data and data Types and either create a DB table or just keep in memory. When you pass the data it is the stored only in memory when the skipping is enabled. When it is stored in the database it becomes much more restrictive but where as in the memory it is flexible. You can save this class after modifications and it will not be rejected.
makeClassFromData(className, pkAttrName, data, attrTypeByNames), skipSaving
Parameters
className: name of the class object (string)
pkAttrName: which attribute is the primary key (string)
data: data hashmap (dictionary)
attrTypeByNames: columns types and names (dictionary)
skipSaving: true create the table only in memory (bool)
createMetadata
create metadata
MetaApi.createMetadata(md)
Parameters
md (dictionary)
Returns
Response from the server.
saveMetadata
save metadata
MetaApi.saveMetadata(md)
Parameters
md (dictionary)
Returns
Response from the server.
getAppDataDir
Locate and get the application data directory
MetaApi.getAppDataDir()
Parameters
no parameters.
Returns
The application data directory.
saveClass
Save class details.
MetaApi.saveClass(className, clsM)
Parameters
className (string)
clsM (ClassM)
Returns
Response from the server.
updateClassVisibility
update Class Visibility
MetaApi.updateClassVisibility(className, visibility)
Parameters
className (string)
visibility (string)
Returns
Response from the server.
createFunctionSysTask
Create a function system task.
MetaApi.createFunctionSysTask(mdId)
or
MetaApi.createFunctionSysTask(orgName, name)
Parameters
mdId (string)
orgName (string)
name (string)
Returns
Response from the server.
Last updated