May 02, 2024 19:53 Returns Supported Clients Sample Parameters Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Parameters Returns Supported Clients Sample Returns Supported Clients SampleSupported Clients
SmartClient
WebClient
NGClient
Methods Summary
QBSelect
createSelect()
Create a query builder for a data source.
QBSelect
createSelect(tableAlias)
Create a query builder for a data source with given table alias.
Array
getColumnNames()
Get the column names of a datasource.
String
getDataSource()
Get the datasource string.
JSFoundSet
getFoundSet()
Returns a foundset object for a specified datasource or server and tablename.
JSFoundSet
getFoundSet(name)
Returns a named foundset object for a specified name.
JSTable
getTable()
Get the table of a datasource.
Methods Details
createSelect()
Create a query builder for a data source.
var q = datasources.db.example_data.book_nodes.createSelect()
q.result.addPk()
q.where.add(q.columns.label_text.not.isin(null))
datasources.db.example_data.book_nodes.getFoundSet().loadRecords(q)
createSelect(tableAlias)
Create a query builder for a data source with given table alias.
The alias can be used inside custom queries to bind to the outer table.
String
tableAlias
the table alias to use
var q = datasources.db.example_data.book_nodes.createSelect('b')
q.result.addPk()
q.where.add(q.columns.label_text.isin('select comment_text from book_text t where t.note_text = ? and t.node_id = b.node_id', ['test']))
datasources.db.example_data.book_nodes.getFoundSet().loadRecords(q)
getColumnNames()
Get the column names of a datasource.
getDataSource()
Get the datasource string.
datasources.db.example_data.orders.getDataSource() // returns 'db:/example_data/orders'
getFoundSet()
Returns a foundset object for a specified datasource or server and tablename.
It is important to note that this is a FACTORY method, it constantly creates new foundsets.
var fs = datasources.db.example_data.orders.getFoundSet()
var ridx = fs.newRecord()
var record = fs.getRecord(ridx)
record.emp_name = 'John'
databaseManager.saveData()
getFoundSet(name)
Returns a named foundset object for a specified name. If named foundset datasource does not match current datasource will not be returned.
If named foundset is not created will return null.
String
name
The named foundset to get for this datasource.
var fs = datasources.db.example_data.orders.getFoundSet('myname')
var ridx = fs.newRecord()
var record = fs.getRecord(ridx)
record.emp_name = 'John'
databaseManager.saveData()
getTable()
Get the table of a datasource.