如何使用 X-devAPI 和 nodejs 在 SQL 中使用连接查询?

SAK*_*SAK 2 sql relational-database mysql-connector node.js

我正在使用 NodeJs。用于编写查询的连接器 X-devAPI。我需要使用连接查询。我如何编写查询?

const session = mySqlx.getSession(config);
 const schema = await session.getSchema('xxxx');
  let tableresp = await schema.getTable('tableName');
        tableresp = await tableresp
            .select(['id', 'name', 'Mobile'])
            .execute(function (row) {
               console.log(row)
            });
Run Code Online (Sandbox Code Playgroud)

小智 6

目前你必须使用普通的 SQL 查询。

await session.sql('SELECT id, name, Mobile FROM xxxx.tableName JOIN ...').execute()
Run Code Online (Sandbox Code Playgroud)

抱歉回复晚了。你的问题没有出现在我正在看的标签中。

免责声明:我是 Node.js 的 MySQL X DevAPI 连接器的首席开发人员