mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
ef25ea1885
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
.yarnrc | ||
package.json | ||
README.md | ||
tsconfig.json |
dbgate-sqltree
JavaScript/TypeScript SQL query-builder library
dbgate-sqltree hold query definition in RAW JSON objects.
Sample usage
const { treeToSql, dumpSqlSelect } = require("dbgate-sqltree");
const dbgatePluginMysql = require("dbgate-plugin-mysql");
const select = {
commandType: "select",
from: {
name: {
pureName: "Album",
},
},
columns: [
{
exprType: "column",
columnName: "name",
},
],
orderBy: [
{
exprType: "column",
columnName: "id",
direction: "ASC",
},
],
};
const sql = treeToSql(dbgatePluginMysql.driver, select, dumpSqlSelect);
console.log("Generated query:", sql);
See TypeScript definitions for complete list of available SQL command options.
Installation
yarn add dbgate-sqltree