- Added support for select statements without a
from
clause. The function is called selectNoFrom. The function name was selected after a lot of discussion. The most natural name would just beselect
, but new users would find that in a list of autocompletions beforeselectFrom
and naturally use it when trying to create aselect from
query. This would be especially true for people coming from knex where aselect from
query is started using aselect
call. #605 - Add object variants of
and
andor
functions. Allows easywhere(eb => eb.and(object))
filters. #583 - Add support for tuples. See some examples here. #611
- Add addPrimaryKeyConstraint for AlterTableBuilder. #639 Thank you @n7olkachev ❤️
- Add
any
function to function module. #612 - Add
between
method to expression builder. #602 - Add
lit
method to expression builder. #600 - Add multi-column variant of
orderBy
. #423 Thank you @igalklebanov ❤️
An example of an object and
call:
const persons = await db
.selectFrom('person')
.selectAll()
.where((eb) => eb.and({
first_name: 'Jennifer',
last_name: eb.ref('first_name')
}))
.execute()
select * from "person"
where "first_name" = $1 and "last_name" = "first_name"