Trillo Workbench Python SDK
  • Introduction
    • Sample Example
  • BaseApi (Basic APIs)
  • LogApi (Logging APIs)
  • DSApi (Database APIs)
    • Overview
    • Retrieve APIs
    • Create and Update API
    • Delete APIs
    • Empty Table
    • Sample Functions Using API
  • FuncApi (Function APIs)
  • TaskApi (Task APIs)
  • CacheApi (Memory Cache APIs)
    • Delete APIs
    • Create and Update API
    • Retrieve APIs
  • StorageApi
  • CallLogger (Logging Level APIs)
  • CommandApi
  • OAuth1Api
  • Google Cloud APIs
    • BigQueryApi (BigQuery APIs)
    • GCSApi (Cloud Storage APIs)
    • GCPAuthApi
    • GCPRestApi
    • GCPTokenInfo
  • Metadata API (MetaApi)
    • Create and Update API
    • All Retrieve-Only
  • UMApi (User, Tenant, Roles APIs)
  • HttpApi (HTTP APIs)
  • SFTPApi
  • FileUtil
  • CSVApi
  • EmailApi (Email APIs)
  • DLPApi
  • DocApi
  • FolderApi
  • GCPGenApi
  • Util
Powered by GitBook
On this page
  • delete
  • deleteMany
  • deleteByQuery
  1. DSApi (Database APIs)

Delete APIs

delete

Delete a record from the table. It can be made permanent or temporary.​ A delete flag is updated when it is handled as temporary.

DSApi.delete(className, id, permanent)

or

DSApi.delete(className, id, permanent, auditMsg)

Parameters

className: the str name of the table
id:        the record number as str
permanent:   permanent or temporary. a boolean
auditMsg:    any message as str

Sample Code

className = "shared.common.product"
permanent = True
id = "12"

res = DSApi.delete(className, id, permanent)

Returns

A Result object indicating the success or failure of the deletion operation.

deleteMany

Delete many records at a time. The list is provided which represents the record numbers​.

DSApi.deleteMany(className, ids, boolean permanent)

or

DSApi.deleteMany(String className, Iterable<String> ids, boolean permanent, String auditMsg)

Parameters

className: the str name of the table
ids:        list of the regards
permanent:   either flagged or permanent. a boolean
auditMsg:    any message as str

Sample Code

className = "shared.common.product"
permanent = True
ids = ["12", "13"]

res = DSApi.deleteMany(className, ids, permanent)

Returns

A Result object indicating the success or failure of the deletion operation.

deleteByQuery

Delete a record (s) by executing a query. ​

DSApi.deleteByQuery (className, query, permanent)

or

DSApi.deleteByQuery(className, query, permanent, auditMsg)

Parameters

className: str name of the table
query:     query as str
permanent: flagged or permanent as boolean

Sample Code

className = "shared.common.product"
permanent = True
query = "Select first_name from product_tbl where price>100"

res = DSApi.deleteByQuery(className, query, permanent)

Returns

A Result object indicating the success or failure of the deletion operation.

PreviousCreate and Update APINextEmpty Table

Last updated 1 year ago