queryWhere method

SqlBuilder queryWhere({
  1. List<String> conditions = const [],
})

Adds a 'WHERE' clause to the SQL query.

The conditions parameter is optional and defaults to an empty list. It should contain the list of conditions for the 'WHERE' clause.

This method adds a 'WHERE' clause to the _select list and then returns the SqlBuilder instance for method chaining.

Usage:

var builder = SqlBuilder();
builder.queryWhere(conditions: ['field1 = value1', 'field2 = value2']);

Implementation

SqlBuilder queryWhere({List<String> conditions = const []}) {
  _select.add('WHERE ${conditions.join(' ')} ');
  return this;
}