leftJoin method
Query
leftJoin(
- dynamic tableName, {
- dynamic tableColumn,
- dynamic baseColumn,
- dynamic baseTableCustom,
- Query function(
- Query
)?,
})
Implementation
Query leftJoin(tableName, {tableColumn, baseColumn, baseTableCustom, Query Function(Query)? function}) {
if (function != null) {
_joinQuery += ' LEFT 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 += ' LEFT JOIN $tableName ON ';
_joinQuery += tableName + '.' + tableColumn + '=' + (baseTableCustom ?? table) + '.' + baseColumn;
}
return this;
}