Examples and templates
In this section, we will look at some examples of simple queries to the users table in our ORM system.
const selectAllUsers = await databaseManager.queryBuilder<Users[]>()
.createView('allUsersView')
.select()
.from('users')
.execute();const selectQueryExample = await databaseManager.queryBuilder<Tasks[]>()
.select(['task_id', 'title', 'status'])
.from('tasks')
.where({
conditions: {
is_completed: { eq: false },
price: { gt: 50 }
},
logicalOperator: 'and'
})
.orderBy('due_date', 'ASC')
.execute();Last updated