Create and Update API
save
Saves the entity passed as input to the database
DSApi.save(className, entity)
or
DSApi.save(className, entity, auditMsg)Parameters
className: the str name of class as created using the workbench
(correspond to the table)
entity: dictionary
auditMsg: strSample Code
className = "shared.common.product"
entity = {"productName" : "table", "description" : "foldable table", "prices" : 620}
res = DSApi.save(className, entity)Returns
saveMany
Saves the list of entities to the database
Parameters
Sample Code
Returns
Update
Updates the attribute name with the provided value
Parameters
Sample Code
Returns
UpdateMany
Update many records at a time. The class name is provided that indirectly represents a table.
Parameters
Sample Code
Returns
UpdateByQuery
Update by executing a query on the table. it takes partial query which is the embellished with where clauses.
Parameters
Sample Code
Returns
executeSqlWriteStatement
Execute a stored procedure or SQL string. The statement is prepared for execution. Use this method when you're specifying the full statement.
Parameters
Returns
Last updated