如何使用 Sails.js 进行复杂的数据库查询,例如连接?
我使用命令行尝试了该generate
方法,它很棒,我将它连接到我的 MySQL 数据库并且效果很好,但现在我需要了解的是如何执行复杂的SELECT
语句。我在文档中找不到它。
如何使用 Sails.js 进行复杂的数据库查询,例如连接?
我使用命令行尝试了该generate
方法,它很棒,我将它连接到我的 MySQL 数据库并且效果很好,但现在我需要了解的是如何执行复杂的SELECT
语句。我在文档中找不到它。
For complicated queries refer to this answer by particlebanana, one of Sails.js core contributors.
As an alternative to perform joins, you can use the associations branch.