Examples and templates
In this section, we will look at some examples of simple queries to the users table in our ORM system.
Create a view that displays all directory items in code order.
const selectAllUsers = await databaseManager.queryBuilder<Users[]>()
.createView('allUsersView')
.select()
.from('users')
.execute();Create a selection query with logical operations under record selection conditions.
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();Subqueries.
Joining tables.
Connection.
Create a simple grouping query using the Sum statistical function.
Creating a grouping query using the HAVING clause.
Create a group request.
Create an update request.
Create a removal request.
Create an add request.
Creating triggers.
Creation of indexes.
Caching.
Last updated