Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Unknown macro: {div}

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Enter additional information related to this 'class' inside the {div} macro with 'id=description'

Unknown macro: {div}


Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {th}

Return Types

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

JSFoundSet

Unknown macro: {span}

JSRecord


Unknown macro: {table}

{column:width=80px|padding=0px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Summary


Unknown macro: {table}

{column:width=80px|padding=0px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getDataSource(serverName, tableName)
Returns the datasource corresponding to the given server/table.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getDataSourceServerName(dataSource)
Returns the server name from the datasource, or null if not a database datasource.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getDataSourceTableName(dataSource)
Returns the table name from the datasource, or null if the specified argument is not a database datasource.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

JSFoundSet

Unknown macro: {td}

getFoundSet(dataSource)
Returns a foundset object for a specified datasource or server and tablename.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

hasRecords(foundset)
Returns true if the (related)foundset exists and has records.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

hasRecords(record, relationString)
Returns true if the (related)foundset exists and has records.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

saveData()
Saves all outstanding (unsaved) data and exits the current record.


Unknown macro: {table}

{column:width=100%|padding=0px}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Details


Unknown macro: {table}

{column:width=100%|padding=0px}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getDataSource
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getDataSource

Unknown macro: {span}

(serverName, tableName)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Returns the datasource corresponding to the given server/table.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{String} serverName – The name of the table's server.
{String} tableName – The table's name.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

String – The datasource of the given table/server.

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
var datasource = databaseManager.getDataSource('example_data', 'categories');
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getDataSourceServerName
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getDataSourceServerName

Unknown macro: {span}

(dataSource)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Returns the server name from the datasource, or null if not a database datasource.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{String} dataSource – The datasource string to get the server name from.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

String – The servername of the datasource.

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
var servername = databaseManager.getDataSourceServerName(datasource);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getDataSourceTableName
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getDataSourceTableName

Unknown macro: {span}

(dataSource)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Returns the table name from the datasource, or null if the specified argument is not a database datasource.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{String} dataSource – The datasource string to get the tablename from.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

String – The tablename of the datasource.

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
var theTableName = databaseManager.getDataSourceTableName(datasource);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getFoundSet
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

JSFoundSet

Unknown macro: {span}

getFoundSet

Unknown macro: {span}

(dataSource)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Returns a foundset object for a specified datasource or server and tablename.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{String} dataSource – The datasource to get a JSFoundset for.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

JSFoundSet – A new JSFoundset for that datasource.

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// type the foundset returned from the call with JSDoc, fill in the right server/tablename
/** @type {JSFoundset<db:/servername/tablename>} */
var fs = databaseManager.getFoundSet(controller.getDataSource())
var ridx = fs.newRecord()
var record = fs.getRecord(ridx)
record.emp_name = 'John'
databaseManager.saveData()
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
hasRecords
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Boolean

Unknown macro: {span}

hasRecords

Unknown macro: {span}

(foundset)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Returns true if the (related)foundset exists and has records.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{JSFoundSet} foundset – A JSFoundset to test.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Boolean – true if the foundset/relation has records.

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
if (elements.customer_id.hasRecords(orders_to_orderitems))
{
	//do work on relatedFoundSet
}
//if (elements.customer_id.hasRecords(foundset.getSelectedRecord(),'orders_to_orderitems.orderitems_to_products'))
//{
//	//do work on deeper relatedFoundSet
//}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
hasRecords
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Boolean

Unknown macro: {span}

hasRecords

Unknown macro: {span}

(record, relationString)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Returns true if the (related)foundset exists and has records.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{JSRecord} record – A JSRecord to test.
{String} relationString – The relation name.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Boolean – true if the foundset/relation has records.

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
if (elements.customer_id.hasRecords(orders_to_orderitems))
{
	//do work on relatedFoundSet
}
//if (elements.customer_id.hasRecords(foundset.getSelectedRecord(),'orders_to_orderitems.orderitems_to_products'))
//{
//	//do work on deeper relatedFoundSet
//}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
saveData
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Boolean

Unknown macro: {span}

saveData

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Saves all outstanding (unsaved) data and exits the current record.
Optionally, by specifying a record or foundset, can save a single record or all reacords from foundset instead of all the data.

NOTE: The fields focus may be lost in user interface in order to determine the edits.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Boolean – true if the save was done without an error.

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
databaseManager.saveData();
//databaseManager.saveData(foundset.getRecord(1));//save specific record
//databaseManager.saveData(foundset);//save all records from foundset

// when creating many records in a loop do a batch save on an interval as every 10 records (to save on memory and roundtrips)
// for (var recordIndex = 1; recordIndex <= 5000; recordIndex++) 
// {
//		foundset.newRecord();
//		someColumn = recordIndex;
//		anotherColumn = "Index is: " + recordIndex;
//		if (recordIndex % 10 == 0) databaseManager.saveData();
// }
Unknown macro: {tr}
Unknown macro: {td}
  • No labels