Module: GetDataInvoke

Fakes client web service invocation of GetDataServices, in order to share metadata classes
Source:

Classes

GetDataInvoke

Methods

(inner) addRowToTable(t, r) → {ObjectRow}

SYNC Adds a copy of the row "r" to the DataTable "t", and returns the linked DataRow
Parameters:
Name Type Description
t DataTable
r ObjectRow
Source:
Returns:
Type
ObjectRow

(inner) createEmptyDataSet(tableName, editType)

ASYNC Returns a deferred resolved with jsDataSet based on "tableName" and "editType" keys
Parameters:
Name Type Description
tableName string
editType string
Source:
Returns:
Promise

(inner) createTableByName(tableName, columnList) → {Deferred.<DataTable>}

ASYNC Creates and returns a DataTable "tableName" with the specified columns
Parameters:
Name Type Description
tableName string
columnList string
Source:
Returns:
Type
Deferred.<DataTable>

(inner) describeColumns(table, listType) → {Deferred.<DataTable>}

ASYNC
Parameters:
Name Type Description
table DataTable
listType string Calls the describeColumns server side method on "tableName" and "listType"
Source:
Returns:
Type
Deferred.<DataTable>

(inner) describeTree(table, listType) → {Deferred.<DataTable>}

ASYNC
Parameters:
Name Type Description
table DataTable
listType string Calls the describeTree server side method on "tableName" and "listType"
Source:
Returns:
Type
Deferred.<DataTable>

(inner) doGet(ds, dataRow, primaryTableName, onlyPeripherals) → {Deferred}

ASYNC Returns a deferred resolved with a DataSet. The dataSet is the "ds" merged with the dataset filtered on the datarow values.
Parameters:
Name Type Description
ds DataSet
dataRow DataRow
primaryTableName string
onlyPeripherals boolean
Source:
Returns:
Type
Deferred

(inner) doGetTable(t, filter, clear, top, selectList) → {Deferred}

ASYNC Gets a DataTable with an optional set of Select. If a list of select is given, adds a select in selectList
Parameters:
Name Type Description
t DataTable DataTable to Get from DataBase
filter sqlFun
clear boolean if true table is cleared before reading
top string parameter for "top" clause of select
selectList Array.<filter:sqlFun, top:string, table:DataTable>
Source:
Returns:
Type
Deferred

(inner) doGetTableRoots(table, filter, clear)

ASYNC Gets some row from a datatable, with all child rows in the same table
Parameters:
Name Type Description
table DataTable
filter jsDataQuery
clear boolean
Source:

(inner) doReadValue(tableName, filter, expr, orderBy) → {Deferred}

ASYNC Returns a single value from a table based on filter. "select value from tableName where filter"
Parameters:
Name Type Description
tableName string
filter sqlFun
expr sqlFun
orderBy string
Source:
Returns:
Type
Deferred

(inner) fillDataSet(dsTarget, tableName, editType, filter) → {Deferred.<(DataSet|string)>}

ASYNC Reads and fills from the server the DatSet with tableName.editType, filters it on "filter" and merges it into dsTarget. Returns a deferred resolved with the DataSet merged.
Parameters:
Name Type Description
dsTarget DataSet
tableName string
editType string
filter sqlFun
Source:
Returns:
Type
Deferred.<(DataSet|string)>

(inner) getByKey(table, row) → {Deferred.<DataRow>}

ASYNC Returns a deferred with the DataRow of the table, filtered based on the keys of the DataTable "table", where the values are those of "row"
Parameters:
Name Type Description
table DataTable
row DataRow
Source:
Returns:
Type
Deferred.<DataRow>

(inner) getDataSet(tableName, editType) → {DataSet}

ASYNC Returns a deferred resolved with jsDataSet based on "tableName" and "editType" keys
Parameters:
Name Type Description
tableName string
editType string
Source:
Returns:
)
Type
DataSet

(inner) getDsByRowKey(dataRow, table, editTypeopt) → {Deferred.<DataSet>}

ASYNC Fills the dataSet starting from a table
Parameters:
Name Type Attributes Description
dataRow DataRow
table DataTable primaryTable
editType string <optional>
used to retrieve a DataSet. If not specified, table.dataset is used
Source:
Returns:
Type
Deferred.<DataSet>

(inner) getPagedTable(tableName, nPage, nRowPerPage, filter, listType, sortBy) → {Deferred.<DataTable>}

ASYNC Returns the rows paginated of the DataTable "tableName". The rows are filtered based on clause "filter"
Parameters:
Name Type Description
tableName string
nPage number
nRowPerPage number
filter sqlFun
listType string
sortBy string
Source:
Returns:
Type
Deferred.<DataTable>

(inner) getRowsByFilter(filter, multiCompare, table, top, prepare, selListopt) → {Deferred}

ASYNC Returns the Rows from the DataTable "table" based on the clause "filter"
Parameters:
Name Type Attributes Description
filter sqlFun
multiCompare boolean
table DataTable
top string
prepare boolean
selList Array.<filter:sqlFun, top:string, table:DataTable> <optional>
Source:
Returns:
Type
Deferred

(inner) getSpecificChild(table, startCondition, startValueWanted, startFieldWanted) → {Deferred.<ObjectRow>}

ASYNC Gets a row from a table T taking the first row by the filter startCondition AND (startfield like startval%) If more than one row is found, the one with the smallest startfield is returned. Used for AutoManage functions. and treevewmanger
Parameters:
Name Type Description
table DataTable
startCondition sqlFun
startValueWanted string
startFieldWanted string
Source:
Returns:
Type
Deferred.<ObjectRow>

(inner) launchCustomServerMethod(method, prms) → {Deferred}

ASYNC Launches a post call to the server with eventName that is the method custom to call, and with custom "prms"
Parameters:
Name Type Description
method string
prms object
Source:
Returns:
Type
Deferred

(inner) multiRunSelect(selectList) → {Deferred}

Executes a bunch of select, based on "selectList". Not much different from a multiple runSelectIntoTable
Parameters:
Name Type Description
selectList Array.<filter:sqlFun, top:string, table:DataTable>
Source:
Returns:
Type
Deferred

(inner) prefillDataSet(dsTarget, tableName, editType) → {Deferred.<DataSet>}

ASYNC Returns a deferred resolved with the DataSet. It loads data from cached DataTable, based on "staticfilter" property
Parameters:
Name Type Description
dsTarget jsDataSet
tableName string
editType string
Source:
Returns:
)
Type
Deferred.<DataSet>

(inner) readCached(d) → {Deferred}

ASYNC Reads all cached tables
Parameters:
Name Type Description
d DataSet
Source:
Returns:
Type
Deferred

(inner) runSelect(tableName, columnList, filter, topopt) → {Deferred.<DataTable>}

ASYNC Returns a deferred DataTable where the rows are select on "tableName" filtered on "filter". If "columnList" is "*" it returns all columns, otherwise only those specified in "columnList". If top is specified it returns only a max of "top" rows, otherwise it returns all the rows.
Parameters:
Name Type Attributes Description
tableName string
columnList string
filter sqlFun
top string <optional>
Source:
Returns:
Type
Deferred.<DataTable>

(inner) runSelectIntoTable(t) → {DataTable}

ASYNC Reads a set of rows in a given DataTable "t" based on clause "filter"
Parameters:
Name Type Description
t DataTable
filter. sqlFun The filter to apply to the select
top. string Max num of rows to read
Source:
Returns:
The table with the rows read
Type
DataTable

(inner) selectCount(tableName, filter) → {Deferred}

ASYNC Gets the rows count of the "tableName" filtered on "filter"
Parameters:
Name Type Description
tableName string
filter sqlFun
Source:
Returns:
Type
Deferred