sql-parser-cst
Advanced tools
Comparing version 0.25.0 to 0.26.0
@@ -11,3 +11,3 @@ import { BaseNode, Keyword } from "./Base"; | ||
import { NumberLiteral } from "./Literal"; | ||
export type AllCreateTableNodes = CreateTableStmt | TableKind | ColumnDefinition | TableOption<Keyword | Keyword[] | Identifier | MemberExpr, Keyword | Expr> | CreateTableLikeClause | TableLikeOption | CreateTableCopyClause | CreateTableCloneClause | WithPartitionColumnsClause | CreateTableUsingClause | CreateTableInheritsClause | CreateTablePartitionByClause | CreateTablePartitionOfClause | CreateTablePartitionBoundClause | PartitionBoundFromTo | PartitionBoundMinvalue | PartitionBoundMaxvalue | PartitionBoundIn | PartitionBoundWith | PartitionBoundModulus | PartitionBoundRemainder | CreateTableDefaultPartitionClause | CreateTableOnCommitClause | TablespaceClause | UsingAccessMethodClause | CreateTableWithoutOidsClause | WithDataClause | CreateTableOfTypeClause | CreateTableServerClause; | ||
export type AllCreateTableNodes = CreateTableStmt | RelationKind | ColumnDefinition | TableOption<Keyword | Keyword[] | Identifier | MemberExpr, Keyword | Expr> | CreateTableLikeClause | TableLikeOption | CreateTableCopyClause | CreateTableCloneClause | WithPartitionColumnsClause | CreateTableUsingClause | CreateTableInheritsClause | CreateTablePartitionByClause | CreateTablePartitionOfClause | CreateTablePartitionBoundClause | PartitionBoundFromTo | PartitionBoundMinvalue | PartitionBoundMaxvalue | PartitionBoundIn | PartitionBoundWith | PartitionBoundModulus | PartitionBoundRemainder | CreateTableDefaultPartitionClause | CreateTableOnCommitClause | TablespaceClause | UsingAccessMethodClause | CreateTableWithoutOidsClause | WithDataClause | CreateTableOfTypeClause | CreateTableServerClause; | ||
export interface CreateTableStmt extends BaseNode { | ||
@@ -17,3 +17,3 @@ type: "create_table_stmt"; | ||
orReplaceKw?: [Keyword<"OR">, Keyword<"REPLACE">]; | ||
kind?: TableKind; | ||
kind?: RelationKind; | ||
tableKw: Keyword<"TABLE">; | ||
@@ -28,5 +28,5 @@ ifNotExistsKw?: [Keyword<"IF">, Keyword<"NOT">, Keyword<"EXISTS">]; | ||
} | ||
export interface TableKind extends BaseNode { | ||
type: "table_kind"; | ||
kindKw: Keyword<"TEMP" | "TEMPORARY"> | [Keyword<"GLOBAL" | "LOCAL">, Keyword<"TEMPORARY" | "TEMP">] | Keyword<"UNLOGGED"> | Keyword<"FOREIGN"> | Keyword<"EXTERNAL"> | Keyword<"SNAPSHOT"> | Keyword<"VIRTUAL">; | ||
export interface RelationKind extends BaseNode { | ||
type: "relation_kind"; | ||
kindKw: Keyword<"TEMP" | "TEMPORARY"> | [Keyword<"GLOBAL" | "LOCAL">, Keyword<"TEMPORARY" | "TEMP">] | Keyword<"UNLOGGED"> | Keyword<"FOREIGN"> | Keyword<"EXTERNAL"> | Keyword<"SNAPSHOT"> | Keyword<"VIRTUAL"> | Keyword<"MATERIALIZED"> | Keyword<"RECURSIVE">; | ||
} | ||
@@ -33,0 +33,0 @@ export interface ColumnDefinition extends BaseNode { |
import { BaseNode, Keyword } from "./Base"; | ||
import { TableKind } from "./CreateTable"; | ||
import { RelationKind } from "./CreateTable"; | ||
import { ListExpr, EntityName } from "./Expr"; | ||
@@ -7,3 +7,3 @@ export interface DropTableStmt extends BaseNode { | ||
dropKw: Keyword<"DROP">; | ||
kind?: TableKind; | ||
kind?: RelationKind; | ||
tableKw: Keyword<"TABLE">; | ||
@@ -10,0 +10,0 @@ ifExistsKw?: [Keyword<"IF">, Keyword<"EXISTS">]; |
@@ -7,3 +7,3 @@ import { AllColumns, BaseNode, Empty, Keyword } from "./Base"; | ||
import { MysqlModifier } from "./dialects/Mysql"; | ||
import { ColumnDefinition, TableKind } from "./CreateTable"; | ||
import { ColumnDefinition, RelationKind } from "./CreateTable"; | ||
import { DeleteStmt, InsertStmt, PostgresqlOperator, PostgresqlOperatorExpr, UpdateStmt } from "./Node"; | ||
@@ -375,3 +375,3 @@ export type AllSelectNodes = CompoundSelectStmt | SelectStmt | WithClause | CommonTableExpr | CteSearchClause | CteCycleClause | CteCycleClauseValues | SelectClause | SelectAll | SelectDistinct | SelectDistinctOn | SelectAsStruct | SelectAsValue | ExceptColumns | ReplaceColumns | FromClause | WhereClause | GroupByClause | GroupByRollup | GroupByCube | GroupByGroupingSets | HavingClause | WindowClause | QualifyClause | NamedWindow | WindowDefinition | OrderByClause | PartitionByClause | LimitClause | LimitAll | LimitRowsExamined | OffsetClause | FetchClause | DualTable | JoinExpr | IndexedTable | NotIndexedTable | LateralDerivedTable | PartitionedTable | TableWithInheritance | TableWithoutInheritance | FuncCallWithColumnDefinitions | WithOrdinalityExpr | RowsFromExpr | UnnestWithOffsetExpr | UnnestExpr | PivotExpr | PivotForIn | UnpivotExpr | UnpivotForIn | TablesampleExpr | TablesampleMethod | TablesamplePercent | TablesampleRepeatable | ForSystemTimeAsOfExpr | JoinOnSpecification | JoinUsingSpecification | SortSpecification | SortDirectionAsc | SortDirectionDesc | SortDirectionUsingOperator | IntoTableClause | IntoVariablesClause | IntoDumpfileClause | IntoOutfileClause | OutfileFields | OutfileLines | OutfileOptionTerminatedBy | OutfileOptionEscapedBy | OutfileOptionStartingBy | OutfileOptionEnclosedBy | OutfileOptionCharacterSet | ForClause | ForClauseTables | LockInShareModeClause | TableClause; | ||
intoKw: Keyword<"INTO">; | ||
kind?: TableKind; | ||
kind?: RelationKind; | ||
tableKw?: Keyword<"TABLE">; | ||
@@ -378,0 +378,0 @@ name: EntityName; |
import { AlterSequenceAction } from "./AlterAction"; | ||
import { BaseNode, Keyword } from "./Base"; | ||
import { RelationKind } from "./CreateTable"; | ||
import { DataType } from "./DataType"; | ||
import { EntityName, Expr, ListExpr } from "./Expr"; | ||
export type AllSequenceNodes = AllSequenceStatements | SequenceKind | SequenceOptionList | SequenceOption; | ||
export type AllSequenceNodes = AllSequenceStatements | SequenceOptionList | SequenceOption; | ||
export type AllSequenceStatements = CreateSequenceStmt | AlterSequenceStmt | DropSequenceStmt; | ||
@@ -10,3 +11,3 @@ export interface CreateSequenceStmt extends BaseNode { | ||
createKw: Keyword<"CREATE">; | ||
kind?: SequenceKind; | ||
kind?: RelationKind; | ||
sequenceKw: Keyword<"SEQUENCE">; | ||
@@ -17,6 +18,2 @@ ifNotExistsKw?: [Keyword<"IF">, Keyword<"NOT">, Keyword<"EXISTS">]; | ||
} | ||
export interface SequenceKind extends BaseNode { | ||
type: "sequence_kind"; | ||
kindKw: Keyword<"TEMP" | "TEMPORARY" | "UNLOGGED">; | ||
} | ||
export interface SequenceOptionList extends BaseNode { | ||
@@ -23,0 +20,0 @@ type: "sequence_option_list"; |
import { AlterViewAction } from "./AlterAction"; | ||
import { BaseNode, Keyword } from "./Base"; | ||
import { TablespaceClause, WithDataClause, UsingAccessMethodClause } from "./CreateTable"; | ||
import { TablespaceClause, WithDataClause, UsingAccessMethodClause, RelationKind } from "./CreateTable"; | ||
import { BigqueryOptions } from "./dialects/Bigquery"; | ||
@@ -10,3 +10,3 @@ import { PostgresqlWithOptions } from "./dialects/Postgresql"; | ||
import { PartitionByClause, SubSelect } from "./Select"; | ||
export type AllViewNodes = AllViewStatements | ViewKind | WithCheckOptionClause; | ||
export type AllViewNodes = AllViewStatements | WithCheckOptionClause; | ||
export type AllViewStatements = CreateViewStmt | DropViewStmt | AlterViewStmt | RefreshMaterializedViewStmt; | ||
@@ -17,3 +17,3 @@ export interface CreateViewStmt extends BaseNode { | ||
orReplaceKw?: [Keyword<"OR">, Keyword<"REPLACE">]; | ||
kinds: ViewKind[]; | ||
kinds: RelationKind[]; | ||
viewKw: Keyword<"VIEW">; | ||
@@ -25,6 +25,2 @@ ifNotExistsKw?: [Keyword<"IF">, Keyword<"NOT">, Keyword<"EXISTS">]; | ||
} | ||
export interface ViewKind extends BaseNode { | ||
type: "view_kind"; | ||
kindKw: Keyword<"TEMP" | "TEMPORARY" | "MATERIALIZED" | "RECURSIVE">; | ||
} | ||
type CreateViewClause = BigqueryOptions | PostgresqlWithOptions | WithCheckOptionClause | ClusterByClause | PartitionByClause | UsingAccessMethodClause | TablespaceClause | WithDataClause | AsClause<SubSelect>; | ||
@@ -40,3 +36,3 @@ export interface WithCheckOptionClause extends BaseNode { | ||
dropKw: Keyword<"DROP">; | ||
kind?: ViewKind; | ||
kind?: RelationKind; | ||
viewKw: Keyword<"VIEW">; | ||
@@ -50,3 +46,3 @@ ifExistsKw?: [Keyword<"IF">, Keyword<"EXISTS">]; | ||
alterKw: Keyword<"ALTER">; | ||
kind?: ViewKind; | ||
kind?: RelationKind; | ||
viewKw: Keyword<"VIEW">; | ||
@@ -53,0 +49,0 @@ ifExistsKw?: [Keyword<"IF">, Keyword<"EXISTS">]; |
@@ -19,3 +19,3 @@ "use strict"; | ||
]), | ||
table_kind: (node) => (0, show_1.show)(node.kindKw), | ||
relation_kind: (node) => (0, show_1.show)(node.kindKw), | ||
column_definition: (node) => (0, show_1.show)([ | ||
@@ -22,0 +22,0 @@ node.name, |
@@ -15,3 +15,2 @@ "use strict"; | ||
]), | ||
sequence_kind: (node) => (0, show_1.show)(node.kindKw), | ||
sequence_option_list: (node) => (0, show_1.show)(node.options), | ||
@@ -18,0 +17,0 @@ sequence_option_as_type: (node) => (0, show_1.show)([node.asKw, node.dataType]), |
@@ -16,3 +16,2 @@ "use strict"; | ||
]), | ||
view_kind: (node) => (0, show_1.show)([node.kindKw]), | ||
with_check_option_clause: (node) => (0, show_1.show)([node.withKw, node.levelKw, node.checkOptionKw]), | ||
@@ -19,0 +18,0 @@ // DROP VIEW statement |
@@ -5,3 +5,3 @@ { | ||
"license": "GPL-2.0-or-later", | ||
"version": "0.25.0", | ||
"version": "0.26.0", | ||
"main": "lib/main.js", | ||
@@ -44,3 +44,4 @@ "types": "lib/main.d.ts", | ||
"lint": "eslint src test scripts perf", | ||
"ts:check": "tsc --noEmit" | ||
"ts:check": "tsc --noEmit", | ||
"changelog": "auto-changelog -p" | ||
}, | ||
@@ -52,2 +53,3 @@ "devDependencies": { | ||
"@typescript-eslint/parser": "^5.47.0", | ||
"auto-changelog": "^2.4.0", | ||
"benchmark": "^2.1.4", | ||
@@ -66,3 +68,15 @@ "eslint": "^8.30.0", | ||
"generate:fast": "src/parser.pegjs" | ||
}, | ||
"auto-changelog": { | ||
"stdout": true, | ||
"startingVersion": "v0.25.0", | ||
"endingVersion": "v0.25.0", | ||
"breakingPattern": "BREAKING!", | ||
"commitLimit": false, | ||
"template": "changelog.hbs", | ||
"replaceText": { | ||
"BREAKING! ": "" | ||
}, | ||
"sortCommits": "date-desc" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5229413
205
0
15
7402