problem description
Multi-table federated query for egg-mysql CRUD statement for the same field.
official query code instance
const results = await this.app.mysql.select("posts", { // post
where: { status: "draft", author: ["author1", "author2"] }, // WHERE
columns: ["author", "title"], //
orders: [["created_at","desc"], ["id","desc"]], //
limit: 10, //
offset: 0, //
});
for example: both tables in mysql have a field, how to select the data of both tables.
mysql is written as: "select a.authoritative b.author form a where a.authoritative b.authoritative;
how to write according to egg.js.