Lt
Less-than comparison (left < right). Extends CompOperator. Shorthand
keys: <, lt.
Constructor
Lt(left: string | SqlElement, right?: any): Lt
new Lt(left: string | SqlElement, right?: any): Lt
Dual-callable. left can be a field-name string (optionally with a trailing []) or an SQL
element; right can be a literal, Param, Raw, or sub-Select.
import { Lt, Select } from '@sqb/builder';
Select().from('customers').where(Lt('price', 100));
// where price < 100
Properties
Inherits every property from CompOperator (_type, _left, _right,
_symbol, _isArray); _symbol is always '<'.
Methods
Inherits ._serialize() from
CompOperator; Lt adds no methods of its own.
Object-literal shorthand
Select().from('customers').where({ 'price <': 100, 'age lt': 18 });
// where price < 100 and age < 18