JoinTablesRecordIds

JoinTablesRecordIds

Find record ID's for matching JOINed table records.

Constructor

new JoinTablesRecordIds(joinTables)

Source:
Parameters:
Name Type Description
joinTables JoinTables

Members

bindVariables

Source:
Properties:
Type Description
BindData

dataJoin

Source:
Properties:
Type Description
JoinTables

joinFields

Source:
Properties:
Type Description
LeftRightJoinFields

joinType

Source:
Properties:
Type Description
String

leftTableName

Source:
Properties:
Type Description
String

masterTable

Source:
Properties:
Type Description
Table

masterTable :Table

Source:
Type:

primaryTableInfo

Source:
Properties:
Type Description
Table

rightTableName

Source:
Properties:
Type Description
String

tableFields

Source:
Properties:
Type Description
TableFields

tableFields

Source:
Properties:
Type Description
TableFields

tableInfo

Source:
Properties:
Type Description
Map.<String, Table>

Methods

createKeyFieldRecordMap(rightField) → {Map.<String, Array.<Number>>}

Description:
  • Find all KEYS in table mapped to an array of record ID's where key is located in table.

Source:
Parameters:
Name Type Description
rightField JoinSideInfo
Returns:
Type
Map.<String, Array.<Number>>

getJoinColumnData(fieldInfo, recordNumber) → {String}

Description:
  • Find (or calculate) the field data for the specified record number.

Source:
Parameters:
Name Type Description
fieldInfo JoinSideInfo
recordNumber Number
Returns:
Type
String

getJoinFieldsInfo() → {LeftRightJoinFields}

Source:
Returns:
Type
LeftRightJoinFields

getLeftRightFieldInfo(astJoin) → {LeftRightJoinFields}

Description:
  • Find the LEFT table and RIGHT table joining fields from AST.

Source:
Parameters:
Name Type Description
astJoin Object
Returns:
Type
LeftRightJoinFields

getMatchedRecordIds() → {MatchingJoinRecordIDs}

Description:
  • Apply JOIN TYPE logic on left and right tables to find the matching record ID's from both left and right tables.

Source:
Returns:
Type
MatchingJoinRecordIDs

getRecordIDs(conditionAst) → {MatchingJoinRecordIDs}

Source:
Parameters:
Name Type Description
conditionAst Object
Returns:
Type
MatchingJoinRecordIDs

getReferencedTableInfo(calcField) → {TableField}

Description:
  • Find the referenced table within the calculated field.

Source:
Parameters:
Name Type Description
calcField String
Returns:
Type
TableField

getTableInfoFromCalculatedField(calcField) → {TableField}

Description:
  • Look for referenced columns in expression to determine table.

Source:
Parameters:
Name Type Description
calcField String

Expression to parse.

Returns:
  • All SQL function parameters found. It will include COLUMN names and constant data.
Type
TableField

leftRightJoin(leftField, rightField, type) → {Array.<Array.<Number>>}

Description:
  • Returns array of each matching record ID from right table for every record in left table. If the right table entry could NOT be found, -1 is set for that record index.

Source:
Parameters:
Name Type Description
leftField JoinSideInfo

left table field

rightField JoinSideInfo

right table field

type String

either 'inner' or 'outer'.

Returns:
  • first index is record ID of left table, second index is a list of the matching record ID's in right table.
Type
Array.<Array.<Number>>

searchColumnsForTable(calcField, columns) → {Object}

Source:
Parameters:
Name Type Description
calcField String
columns Array.<String>
Returns:
Type
Object

setBindVariables(bindVariables) → {JoinTablesRecordIds}

Source:
Parameters:
Name Type Description
bindVariables BindData

Bind variable data.

Returns:
Type
JoinTablesRecordIds

setJoinType(joinType) → {JoinTablesRecordIds}

Source:
Parameters:
Name Type Description
joinType String
Returns:
Type
JoinTablesRecordIds

setLeftTableName(name) → {JoinTablesRecordIds}

Source:
Parameters:
Name Type Description
name String
Returns:
Type
JoinTablesRecordIds

setPrimaryTableInfo(primaryTableInfo) → {JoinTablesRecordIds}

Source:
Parameters:
Name Type Description
primaryTableInfo Table
Returns:
Type
JoinTablesRecordIds

setRightTableName(name) → {JoinTablesRecordIds}

Source:
Parameters:
Name Type Description
name String
Returns:
Type
JoinTablesRecordIds

setTableFields(tableFields) → {JoinTablesRecordIds}

Source:
Parameters:
Name Type Description
tableFields TableFields
Returns:
Type
JoinTablesRecordIds

setTableInfo(tableInfo) → {JoinTablesRecordIds}

Source:
Parameters:
Name Type Description
tableInfo Map.<String, Table>

Map of table info.

Returns:
Type
JoinTablesRecordIds