Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sql-parser-cst

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-parser-cst - npm Package Compare versions

Comparing version 0.5.3 to 0.6.0

lib/keywords/bigquery.keywords.d.ts

1

lib/ParserOptions.d.ts
export declare const validDialectNames: {
sqlite: boolean;
mysql: boolean;
bigquery: boolean;
};

@@ -5,0 +6,0 @@ export declare type DialectName = keyof typeof validDialectNames;

@@ -7,2 +7,3 @@ "use strict";

mysql: true,
bigquery: true,
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isReservedKeyword = void 0;
const bigquery_keywords_1 = require("../keywords/bigquery.keywords");
const mysql_keywords_1 = require("../keywords/mysql.keywords");

@@ -8,2 +9,3 @@ const sqlite_keywords_1 = require("../keywords/sqlite.keywords");

const keywordMap = {
bigquery: bigquery_keywords_1.__RESERVED_KEYWORDS__,
mysql: mysql_keywords_1.__RESERVED_KEYWORDS__,

@@ -10,0 +12,0 @@ sqlite: sqlite_keywords_1.__RESERVED_KEYWORDS__,

3

lib/utils/parserState.d.ts

@@ -10,5 +10,6 @@ import { DialectName, ParamType, ParserOptions } from "src/ParserOptions";

export declare const getDialect: () => DialectName;
export declare const isBigquery: () => boolean;
export declare const isMysql: () => boolean;
export declare const isSqlite: () => boolean;
export declare const isMysql: () => boolean;
export declare const hasParamType: (name: ParamType) => boolean | undefined;
export declare const isEnabledWhitespace: (ws: Whitespace) => boolean | undefined;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isEnabledWhitespace = exports.hasParamType = exports.isMysql = exports.isSqlite = exports.getDialect = exports.setOptionsFunction = exports.getOptions = exports.setRangeFunction = exports.getRange = void 0;
exports.isEnabledWhitespace = exports.hasParamType = exports.isSqlite = exports.isMysql = exports.isBigquery = exports.getDialect = exports.setOptionsFunction = exports.getOptions = exports.setRangeFunction = exports.getRange = void 0;
/** Injects function to access source location range data */

@@ -16,6 +16,8 @@ const setRangeFunction = (fn) => {

exports.getDialect = getDialect;
const isBigquery = () => (0, exports.getDialect)() === "bigquery";
exports.isBigquery = isBigquery;
const isMysql = () => (0, exports.getDialect)() === "mysql";
exports.isMysql = isMysql;
const isSqlite = () => (0, exports.getDialect)() === "sqlite";
exports.isSqlite = isSqlite;
const isMysql = () => (0, exports.getDialect)() === "mysql";
exports.isMysql = isMysql;
const hasParamType = (name) => {

@@ -22,0 +24,0 @@ var _a;

@@ -5,3 +5,3 @@ {

"license": "GPL-2.0-or-later",
"version": "0.5.3",
"version": "0.6.0",
"main": "lib/main.js",

@@ -13,2 +13,3 @@ "types": "lib/main.d.ts",

},
"homepage": "https://github.com/nene/sql-parser-cst",
"bugs": {

@@ -28,5 +29,6 @@ "url": "https://github.com/nene/sql-parser-cst/issues"

"build": "yarn clean && yarn generate && tsc",
"test:bigquery": "jest --config test/config/bigquery.json",
"test:mysql": "jest --config test/config/mysql.json",
"test:sqlite": "jest --config test/config/sqlite.json",
"test": "yarn generate && yarn test:mysql && yarn test:sqlite",
"test": "yarn generate && yarn test:bigquery && yarn test:mysql && yarn test:sqlite",
"perf": "yarn ts-node perf/perf-test.ts"

@@ -33,0 +35,0 @@ },

@@ -13,2 +13,3 @@ # SQL Parser CST [![npm version](https://img.shields.io/npm/v/sql-parser-cst)](https://www.npmjs.com/package/sql-parser-cst) ![example workflow](https://github.com/nene/sql-parser-cst/actions/workflows/build.yml/badge.svg)

- **MySQL** - basic support for the most common SQL statements.
- **BigQuery** - experimental.

@@ -15,0 +16,0 @@ **Note:** This software is still in very active development.

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc