queryJoin method
Adds a 'JOIN' clause to the SQL query.
The table and on parameters are required. table should contain the name of the table to join, and on should contain the join condition.
The join parameter is optional and defaults to 'INNER JOIN'. It should contain the type of join to perform. Use constants from the SqlBuilder.constOperators map to specify the join type.
This method adds a 'JOIN' clause to the _select list and then returns the SqlBuilder instance for method chaining.
Usage:
var builder = SqlBuilder();
builder.queryJoin(table: 'table2', on: 'table1.id = table2.id');
Implementation
SqlBuilder queryJoin(
{@required required String table,
@required required String on,
String join = 'INNER JOIN'}) {
_select.add('$join $table ON $on ');
return this;
}