Socket
Socket
Sign inDemoInstall

dbgate-sqltree

Package Overview
Dependencies
1
Maintainers
1
Versions
125
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dbgate-sqltree

JavaScript/TypeScript SQL query-builder library


Version published
Weekly downloads
138
increased by27.78%
Maintainers
1
Install size
1.37 MB
Created
Weekly downloads
 

Changelog

Source

5.2.2

  • FIXED: Optimalized load DB structure for PostgreSQL #451
  • ADDED: Auto-closing query connections after configurable (15 minutes default) no-activity interval #468
  • ADDED: Set application-name connection parameter (for PostgreSQL and MS SQL) for easier identifying of DbGate connections
  • ADDED: Filters supports binary IDs #467
  • FIXED: Ctrl+Tab works (switching tabs) #457
  • FIXED: Format code supports non-standard letters #450
  • ADDED: New logging system, log to file, ability to reduce logging #360 (using https://www.npmjs.com/package/pinomin)
  • FIXED: crash on Windows and Mac after system goes in suspend mode #458
  • ADDED: dbmodel standalone NPM package (https://www.npmjs.com/package/dbmodel) - deploy database via commandline tool

Readme

Source

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

Keywords

FAQs

Last updated on 01 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc