Knows how to manipulate DataSet accordingly to MetaData assumptions
Classes
Methods
(inner) addNotEntityChild(t, child)
SYNC
Sets the table as "notEntityChild". So the table isn't cleared during freshform and refills
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable | |
child |
DataTable |
(inner) addNotEntityChildFilter(t, child)
SYNC
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable | |
child |
DataTable |
(inner) addNotEntityChildRel(child, relName)
SYNC
Sets the table as NotEntitychild. So the table isn't cleared during freshform and refills
Parameters:
Name | Type | Description |
---|---|---|
child |
DataTable | |
relName |
string |
(inner) allowAllClear(ds)
SYNC
Sets all "NotSubEntityChild" tables ofthe dataset "ds" as "CanClear". Called when form is cleared or data is posted
Parameters:
Name | Type | Description |
---|---|---|
ds |
DataSet |
(inner) allowClear(t, allowopt) → {boolean}
SYNC
Gets/sets the clearAllowed property for a DataTable "t". It is used to check if a table can be cleared without loosing data
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
t |
DataTable | ||
allow |
boolean |
<optional> |
Returns:
- Type
- boolean
(inner) allowDbNull(c, valueopt) → {boolean}
SYNC
Gets/sets "allowDbNull" property on DataColumn "c" property (False if data is not nullable in the database)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
DataColumn | ||
value |
boolean |
<optional> |
Returns:
- Type
- boolean
(inner) allowZero(c, valueopt) → {boolean}
SYNC
Gets/sets "allowZero" property on DataColumn "c" property (False if data not permit zero in the database)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
DataColumn | ||
value |
boolean |
<optional> |
Returns:
- Type
- boolean
(inner) applyCascadeDelete(rowToDelete)
SYNC
Does the cascade delete of the row "rowToDelete"
Parameters:
Name | Type | Description |
---|---|---|
rowToDelete |
ObjectRow |
(inner) cachedTable(t, valueopt) → {*}
SYNC
Gets/sets cached flag on a table "t"
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
t |
DataTable | ||
value |
boolean |
<optional> |
Returns:
- Type
- *
(inner) calcTemporaryID(table, row)
SYNC
Evaluates a temporary value for a field of a row, basing on AutoIncrement
properties of the column, without reading from DB.
Parameters:
Name | Type | Description |
---|---|---|
table |
DataTable | |
row |
DataRow |
(inner) calculateRow(r)
SYNC
Evaluates custom fields for a single row "r". Calls the delegate linked to the table,
corresponding to the MetaData.CalculateFields() virtual method (if it has been defined).
Parameters:
Name | Type | Description |
---|---|---|
r |
ObjectRow |
(inner) calculateTable(t)
SYNC
Evaluates custom fields for every row of a DataTable "t". Calls the delegate linked to the table,
corresponding to the MetaData.CalculateFields() virtual method (if it has been defined).
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
(inner) canRead(t) → {boolean}
SYNC
Tells if a table should be cleared and read again during a refresh.
Cached tables are not read again during refresh if they have been already been read
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
Returns:
- Type
- boolean
(inner) cascadeDelete(row) → {*}
Deletes a row with all subentity child
Parameters:
Name | Type | Description |
---|---|---|
row |
ObjectRow |
Returns:
- Type
- *
(inner) checkForFalseUpdates(dRow) → {boolean}
SYNC
Returns true if row (modified) is not really a modified row
Parameters:
Name | Type | Description |
---|---|---|
dRow |
DataRow |
Returns:
- Type
- boolean
(inner) clearEntity(d)
SYNC
Clears all tables of dataset "d" except for temporary and cached (including pre-filled combobox).
Also undoes the effect of denyclear on all secondary tables setting tables with AllowClear()
Parameters:
Name | Type | Description |
---|---|---|
d |
DataSet |
Returns:
(inner) cmpSelectors(t, row1, row2) → {boolean}
SYNC
For each AutoIncrement obj of table t, compares the values of the two rows.
Returns false if a value is different, returns true if all values on selector columns are equal
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable | |
row1 |
DataRow | |
row2 |
DataRow |
Returns:
true if all values for row1 and row2 in all selector columns are equal, false otherwise
- Type
- boolean
(inner) columnExpression(c, value) → {string|jsDataQuery|*}
SYNC
Gets/Sets an expression associated to a DataColumn "c"
Parameters:
Name | Type | Description |
---|---|---|
c |
DataColumn | |
value |
string | jsDataQuery |
Returns:
- Type
- string | jsDataQuery | *
(inner) columnNameList(table) → {string}
ASYNC
Returns the list of real (not temporary or expression) columns NAMES of a table "table"
formatting it like "fieldname1, fieldname2,...."
Returns "*" if no column is set
Parameters:
Name | Type | Description |
---|---|---|
table |
DataTable |
Returns:
- Type
- string
(inner) computeRowsAs(t, listType, calcFunction)
SYNC
Tells MetaData Engine to call CalculateFields(R,ListingType) whenever:
- a row is loaded from DataBase
- a row is changed in a sub-entity form and modification accepted with mainsave
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable | |
listType |
string | |
calcFunction |
function |
(inner) copyAutoincrementsProperties(dtIn, dtOut)
SYNC
Copies the autoincrement properties form DataTable "dtIn" to DataTable "dtOut"
Parameters:
Name | Type | Description |
---|---|---|
dtIn |
DataTable | |
dtOut |
DataTable |
(inner) denyNull(c, valueopt) → {boolean}
SYNC
Gets/sets denyNull property on DataColumn "c" property
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
DataColumn | ||
value |
boolean |
<optional> |
Returns:
- Type
- boolean
(inner) denyZero(c, valueopt) → {boolean}
SYNC
Gets/sets denyZero property on DataColumn "c" property
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
DataColumn | ||
value |
boolean |
<optional> |
Returns:
- Type
- boolean
(inner) getgetMaxLenName(col) → {*}
SYNC
Given col type returns the length of the field
Parameters:
Name | Type | Description |
---|---|---|
col |
DataColumn |
Returns:
- Type
- *
(inner) getName(child, relName)
SYNC
Parameters:
Name | Type | Description |
---|---|---|
child |
DataTable | |
relName |
string |
(inner) getName(table)
SYNC
Removes a table from being a NotEntitychild
Parameters:
Name | Type | Description |
---|---|---|
table |
DataTable |
(inner) getName(dsDest, tDest, dsRif, rSource, forceAddState) → {DataRow}
SYNC
Moves a DataRow and all its childs from "dsRif" to "dsDest".
Parameters:
Name | Type | Description |
---|---|---|
dsDest |
DataSet | |
tDest |
DataTable | |
dsRif |
DataSet | |
rSource |
DataRow | |
forceAddState |
boolean |
Returns:
- Type
- DataRow
(inner) getRelatedRowColumn(r, relatedTableName, relatedColumn) → {object}
SYNC
Returns a field of a row related to row "r" in the table relatedTableName
Parameters:
Name | Type | Description |
---|---|---|
r |
ObjectRow | base row |
relatedTableName |
string | table where the related row is to be searched |
relatedColumn |
string | column containing the value |
Returns:
- Type
- object
(inner) getRowTemporaryValues(r)
SYNC
Evaluates expressions for the given row
Parameters:
Name | Type | Description |
---|---|---|
r |
DataRow |
(inner) getTemporaryValues(t)
SYNC
Evaluates expressions for each DataTable "t" rows
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
(inner) getWhereKeyClause(valueRow, valueColTable, filterColTable, posting) → {jsDataQuery}
SYNC
Builds a DataQuery clause where the keys are the columns in "filterColTable" and the values are those in "valueRow" DataRow
Parameters:
Name | Type | Description |
---|---|---|
valueRow |
DataRow | Row to use for getting values to compare |
valueColTable |
DataTable | Row Columns of ParentRow from which values to be compare have to be taken |
filterColTable |
DataTable | Row Column of ChildRows for which the Column NAMES have to be taken |
posting |
bool | use posting column names where set |
Returns:
- Type
- jsDataQuery
(inner) getWhereKeyClauseByColumns(valueRow, valueCol, filterCol, filterColTable, posting) → {sqlFun}
SYNC
Builds a DataQuery clause where the keys are the columns in "filterColTable" and the values are those in "valueRow" DataRow
Parameters:
Name | Type | Description |
---|---|---|
valueRow |
DataRow | Row to use for getting values to compare |
valueCol |
Array.<DataColumn> | Columns of ParentRow from which values to be compare have to be taken |
filterCol |
Array.<DataColumn> | Columns of ChildRows for which the Column NAMES have to be taken |
filterColTable |
DataTable | table linked to the filtercolcolumns |
posting |
bool | use posting column names where set |
Returns:
- Type
- sqlFun
(inner) hasChanges(ds, primary, sourceRow, detailPage) → {boolean}
SYNC
Returns true if dataset has changes, false otherwise.
Parameters:
Name | Type | Description |
---|---|---|
ds |
DataSet | |
primary |
DataTable | |
sourceRow |
DataRow | >> Row in master DataSet |
detailPage |
boolean |
Returns:
- Type
- boolean
(inner) insertFilter(t, valueopt) → {jsDataQuery}
SYNC
Gets/sets insert filter "value" on a table "t"
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
t |
DataTable | ||
value |
jsDataQuery |
<optional> |
Returns:
- Type
- jsDataQuery
(inner) isColumnNumeric(c) → {boolean}
SYNC
Returns true if the column is numeric, false otherwise
Parameters:
Name | Type | Description |
---|---|---|
c |
DataColumn |
Returns:
- Type
- boolean
(inner) isEntityChildRelation(r) → {boolean}
SYNC
Checks if a relation connects any field that is primarykey for both parent and child
Parameters:
Name | Type | Description |
---|---|---|
r |
DataRelation |
Returns:
- Type
- boolean
(inner) isParentTableByKey(ds, parentTable, childTable) → {boolean}
SYNC
Checks if parent table "parentTable" is related with KEY fields of Child table "childTable"
Parameters:
Name | Type | Description |
---|---|---|
ds |
DataSet | |
parentTable |
DataTable | |
childTable |
DataTable |
Returns:
- Type
- boolean
(inner) isSubEntity(childTable, parentTable) → {boolean}
SYNC
Returns true if "childTable" is a subentity table of "parentTable", false otherwise
A table is subentity if it is child and all columns of primary table must be connected to a child key field
Parameters:
Name | Type | Description |
---|---|---|
childTable |
DataTable | |
parentTable |
DataTable |
Returns:
- Type
- boolean
(inner) isSubEntityRelation(rel, childTable, parentTable) → {boolean}
SYNC
Returns true if the relation "rel" is a db relation between "childTable" and "parentTable"
and all columns of primary table must be connected to a child key field
Parameters:
Name | Type | Description |
---|---|---|
rel |
DataRelation | |
childTable |
DataTable | |
parentTable |
DataTable |
Returns:
- Type
- boolean
(inner) lockRead(t)
SYNC
Set cached flag on a DataTable "t"
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
(inner) moveDataRow(destTable, toCopy, forceAddState) → {DataRow}
SYNC
Moves "toCopy" row to "destTable" DataTable
Parameters:
Name | Type | Description |
---|---|---|
destTable |
DataTable | |
toCopy |
DataRow | |
forceAddState |
boolean |
Returns:
- Type
- DataRow
(inner) notEntityChild(t) → {jsDataQuery}
SYNC
Gets the "notEntityChild" property of the DataTable "t".
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
Returns:
- Type
- jsDataQuery
(inner) notEntityChildFilter(t, filteropt) → {jsDataQuery}
SYNC
Gets/sets the "notEntityChild" property of the DataTable "t".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
t |
DataTable | ||
filter |
jsDataQuery |
<optional> |
Returns:
- Type
- jsDataQuery
(inner) realTable(t) → {boolean}
SYNC
Checks if a table is a real table (not temporary)
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
Returns:
- Type
- boolean
(inner) reCache(t)
SYNC
If a table "t" is cached, is marked to be read again in next
ReadCached. If the table is not cached, has no effect
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
(inner) searchFilter(t, valueopt) → {*}
SYNC
Gets/Sets a search filter "value" on a table "t"
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
t |
DataTable | ||
value |
jsDataQuery |
<optional> |
Returns:
- Type
- *
(inner) setAsRead(t)
SYNC
Set a table as "read". It has no effect if table isn't a chached table
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable |
(inner) sorting(t, orderBy) → {string}
SYNC
Gets/sets the sorting of the DataTable "t"
Parameters:
Name | Type | Description |
---|---|---|
t |
DataTable | |
orderBy |
string |
Returns:
- Type
- string
(inner) temporaryColumn(c) → {boolean}
SYNC
Returns true if the DataColumn "c" is a temporay Column, flase otherwise
Parameters:
Name | Type | Description |
---|---|---|
c |
DataColumn |
Returns:
- Type
- boolean
(inner) temporaryTable(t, valueopt) → {boolean}
SYNC
Gets/sets temporary flag on a table
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
t |
DataTable | ||
value |
boolean |
<optional> |
Returns:
- Type
- boolean
(inner) visitedFullyTable(t, valueopt) → {boolean}
SYNC
Gets/Sets cached flag on a table "t"
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
t |
DataTable | ||
value |
bool |
<optional> |
Returns:
- Type
- boolean
(inner) xCopy(dsSource, dsDest, rSource, rDest) → {DataRow}
SYNC
Copies a DataRow from dsSource to dsDest.
rSource and rDest must have same key, or rSource have to not generate conflicts in dsDest
Parameters:
Name | Type | Description |
---|---|---|
dsSource |
DataSet | |
dsDest |
DataSet | |
rSource |
DataRow | |
rDest |
DataRow |
Returns:
- Type
- DataRow
(inner) xCopyChilds(dsDest, dsSource, rowSource)
SYNC
Copies a DataRow and all its childs from "dsSource" to "dsDest"
Parameters:
Name | Type | Description |
---|---|---|
dsDest |
DataSet | |
dsSource |
DataSet | |
rowSource |
DataRow |
(inner) xRemoveChilds(dsRif, rDest)
SYNC
Removes a row "rDest" with all his subentity childs. Only considers tables of D inters. Rif
Parameters:
Name | Type | Description |
---|---|---|
dsRif |
DataSet | |
rDest |
DataRow |
(inner) xVerifyChangeChilds(dest, tDest, rif, rSource) → {boolean}
SYNC
Checks if rSource and all childs have not changed comparing them with Dest content
Returns true if there are changes
Parameters:
Name | Type | Description |
---|---|---|
dest |
DataSet | |
tDest |
DataTable | |
rif |
DataSet | |
rSource |
ObjectRow |
Returns:
- Type
- boolean
(inner) xVerifyRowChange(dest, tDest, source, rSource)
SYNC
Verifies if a row is not changed between parent and child dataset
Return true if there are changes
Parameters:
Name | Type | Description |
---|---|---|
dest |
DataSet | |
tDest |
DataTable | |
source |
DataSet | |
rSource |
ObjectRow | * @returns {boolean} |