Module: getDataUtils

Collection of utility functions for GetData
Source:

Methods

(inner) cloneDataSet(ds) → {DataSet}

SYNC Returns a cloned copy of "ds" input using the ser/der methods of the framework
Parameters:
Name Type Description
ds DataSet
Source:
Returns:
Type
DataSet

(inner) cloneDataTable(dt) → {DataTable}

SYNC Returns a cloned copy of "dt" input using the ser/der methods of the framework
Parameters:
Name Type Description
dt DataTable
Source:
Returns:
Type
DataTable

(inner) containsNull(row, cols) → {boolean}

SYNC Returns true if there is a null value or "", for some value in row on the columns cols
Parameters:
Name Type Description
row ObjectRow
cols Array.<DataColumn>
Source:
Returns:
true or false depending if there are null values on row in cols
Type
boolean

(inner) getDataRelationSerialized(rel) → {string}

SYNC Serializes the DataRelation "rel"
Parameters:
Name Type Description
rel DataRelation
Source:
Returns:
the string of DataRelation serialized
Type
string

(inner) getJsDataQueryFromJson(jsonJsDataQuery) → {sqlFun}

SYNC Given a json representation of the JsDataQuery returns a JsDataQuery
Parameters:
Name Type Description
jsonJsDataQuery string Json string
Source:
Returns:
the jsDataQuery representation of the json
Type
sqlFun

(inner) getJsDataSetFromJson(jsonJsDataSet) → {DataSet}

SYNC Given a json representation of the DataSet returns a JsDataSet
Parameters:
Name Type Description
jsonJsDataSet string JSon string
Source:
Returns:
the dataset
Type
DataSet

(inner) getJsDataTableFromJson(jsonJsDataTable) → {DataTable}

SYNC Given a json representation of the DataTable returns a Js DataTable
Parameters:
Name Type Description
jsonJsDataTable string JSon string
Source:
Returns:
the datatable
Type
DataTable

(inner) getJsObjectFromJson(json) → {object}

SYNC Given a json representation of the DataSet/DataTable returns a javascript object
Parameters:
Name Type Description
json string Json string
Source:
Returns:
an object (DataTable or DataSet)
Type
object

(inner) getJsonFromJsDataQuery(dataQuery) → {string}

SYNC Given jsDataQuery returns the json string. first it converts jsDataQuery into js object and to a json string
Parameters:
Name Type Description
dataQuery jsDataQuery
Source:
Returns:
the json string
Type
string

(inner) getJsonFromJsDataSet(ds) → {string}

SYNC Given a jsDataSet returns the json string. First it calls the methods serialize() of jsDataSet and then returns the json representation of the dataset object
Parameters:
Name Type Description
ds DataSet
serializeStructure. boolean If true it serialize data and structure
Source:
Returns:
the json string
Type
string

(inner) getJsonFromJsDataSet(dt) → {string}

SYNC Serializes a DataTable with the data and structure
Parameters:
Name Type Description
dt DataTable
Source:
Returns:
the json string
Type
string

(inner) getJsonFromMessages(messages) → {string}

SYNC Given an array of message object returns the json string
Parameters:
Name Type Description
messages Array.<string>
Source:
Returns:
Type
string

(inner) mergeDataSet(checkExistence)

SYNC Merges the rows of dsSource into dsTarget
Parameters:
Name Type Description
dsDest. DataSet DataSet target, where inject new rows, taken form dsSource
dsSource. DataSet The new DataSet, with modifies read from server. Need to merge these rows into dsTarget
checkExistence boolean
Source:

(inner) mergeDataSetChanges(dsDest, dsSource, changesCommittedToDB)

SYNC Merges rows modified of dsSource into dsDest. Use "merge" method of DataTable of jsDataSet
Parameters:
Name Type Description
dsDest DataSet
dsSource DataSet
changesCommittedToDB boolean
Source:

(inner) mergeRowsIntoTable(tDest, rows, checkExistence)

SYNC Merges given "rows" in a specified table "tDest"
Parameters:
Name Type Description
tDest DataTable
rows Array.<ObjectRow>
checkExistence boolean
Source: