queryLimit method

SqlBuilder queryLimit({
  1. String limit = '',
})

Adds a 'LIMIT' clause to the SQL query.

The limit parameter is optional and defaults to an empty string. It should contain the limit for the 'LIMIT' clause.

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

Usage:

var builder = SqlBuilder();
builder.queryLimit(limit: '10');

Implementation

SqlBuilder queryLimit({String limit = ''}) {
  _select.add('LIMIT $limit ');
  return this;
}