cloud-cap-samples icon indicating copy to clipboard operation
cloud-cap-samples copied to clipboard

Adding suppliers showing integration with S/4

Open danjoa opened this issue 4 years ago • 3 comments

danjoa avatar Feb 17 '21 12:02 danjoa

Still work in progress ... :) Partly because it uses some convenient shortcuts we just added to be published with upcoming release, like this one:

class DatabaseService {
  ...
  /** Convenience shortcut to check whether an entity instance exists */
  async exists (entity,key) {
     return this.run (SELECT(1).from(entity,key))
  }
}

Rationale for that one: I'm afraid many would just do something like this:

let exists = db.read('Books',201)
if (exists) ...

But this would do a SELECT * which might read tens or hundreds of element data unnecessarily

danjoa avatar Feb 17 '21 18:02 danjoa

Latest commit requires https://github.wdf.sap.corp/cdx/cds/pull/2114

danjoa avatar Jun 08 '21 16:06 danjoa

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 09 '21 06:06 CLAassistant