How do you execute SQL in an app behavior?

In a business object behavior, I just do this.execute(sql,params,options). What is the equivalent in an App Behavior?

To execute SQL in an App Behavior, you’ll need to get a reference to the data source object. A couple ways to do so are:

this.app.dataSources['datasource-name'].execute
// If you include a business object (ex: MyObject) as a dependency, then:
MyObject._staticRepository.dataSource.execute
1 Like