crossJoin method
Query
crossJoin(
- dynamic tableName, {
- dynamic tableColumn,
- dynamic baseColumn,
- dynamic baseTableCustom,
- Query function(
- Query
)?,
})
Implementation
Query crossJoin(tableName, {tableColumn, baseColumn, baseTableCustom, Query Function(Query)? function}) {
if (function != null) {
_joinQuery += ' ( ';
_joinQuery += ' CROSS JOIN $tableName ON ';
Query q = function(Query(table: baseTableCustom ?? table));
_select += q._select;
_joinQuery += q._joinQuery.replaceAll('{TABLE_COLUMN_FILL}', baseTableCustom ?? table) + ' ' + q._lastQuery.replaceAll('WHERE', 'AND');
} else {
_joinQuery += ' CROSS JOIN $tableName ON ';
_joinQuery += tableName + '.' + tableColumn + '=' + (baseTableCustom ?? table) + '.' + baseColumn;
}
return this;
}