-
Notifications
You must be signed in to change notification settings - Fork 0
WHERE: EQ
Ali Amirnezhad edited this page Jul 24, 2019
·
1 revision
const query = myQueryBuilder
.SELECT()
.from('table')
.where({ field: { $EQ: 'value' } })
.get();
// SELECT * FROM `table` WHERE ((`field` = 'value'))
const query = myQueryBuilder
.SELECT()
.from('table')
.where({ field: { $EQ: 2 } })
.get();
// SELECT * FROM `table` WHERE ((`field` = 2))
const query = myQueryBuilder
.SELECT()
.from('table')
.where({ field: { $EQ: new Date() } })
.get();
// SELECT * FROM `table` WHERE ((`field` = '1979-06-03 01:23:45'))
const query = myQueryBuilder
.SELECT()
.from('table')
.where({ field: { $EQ: { $DATE: new Date() } } })
.get();
// SELECT * FROM `table` WHERE ((`field` = '1979-06-03'))
const query = myQueryBuilder
.SELECT()
.from('table')
.where({ field: { $EQ: { $TIME: new Date() } } })
.get();
// SELECT * FROM `table` WHERE ((`field` = '01:23:45'))