Trillo Workbench Java 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)
Powered by GitBook
On this page
  • delete
  • deleteMany
  • deleteByQuery

Was this helpful?

  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(String className, String id, boolean permanent)

or

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

Parameters

className: the name of the table
id:        the record number
permanent:   permanent or temporary
auditMsg:    any message

Sample Code

    String className = "shared.common.product";
    boolean permanent = true;
    String id = "12";
    Object res = DSApi.delete(className, id, permanent);

Returns

deleteMany

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

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

or

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

Parameters

className: the name of the table
ids:        list of the regards
permanent:   either flagged or permanent
auditMsg:    any message

Sample Code

    String className = "shared.common.product";
    boolean permanent = true;
    Iterable<String> ids = Arrays.asList(new String[]{"12", "13"});
    Object res = DSApi.deleteMany(className, ids, permanent);

Returns

deleteByQuery

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

DSApi.deleteByQuery(String className, String query, boolean permanent)

or

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

Parameters

className: name of the table
query:     query
permanent: flagged or permanent

Sample Code

    String className = "shared.common.product";
    boolean permanent = true;
    String query = "Select first_name from product_tbl where price>100";
    Object res = DSApi.deleteByQuery(className, query, permanent);

Returns

Last updated 1 year ago

Was this helpful?