How egg-sequelize executes custom queries

Sequelize.query ("select * from..".
this is the native framework custom query method

ask how to execute the query in egg-sequelize.

Mar.01,2021

this.app.model.query ('select * from account', {type:'SELECT'}


if you don't want to query with SQL statements, just use sequelizejs's Querying. Egg-sequelize just encapsulates sequelizejs as a plug-in to the egg framework, so you can refer to how to use it.

  

await this.app.model.query ('select * from account', {type:'SELECT'}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37759-4ecfd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37759-4ecfd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?