Comparing version 6.3.0 to 7.0.0
@@ -1,6 +0,5 @@ | ||
/// <reference types="node" /> | ||
interface INodeable { | ||
toNode(): Node; | ||
} | ||
declare type PartialNodeable<T> = { | ||
type PartialNodeable<T> = { | ||
[P in keyof T]?: T[P] | INodeable | Buffer | null; | ||
@@ -247,3 +246,3 @@ }; | ||
declare type SQLDialects = 'mssql' | 'mysql' | 'oracle' | 'postgres' | 'sqlite'; | ||
type SQLDialects = 'mssql' | 'mysql' | 'oracle' | 'postgres' | 'sqlite'; | ||
interface ColumnDefinitionBase { | ||
@@ -373,2 +372,3 @@ property?: string; | ||
from(...nodes: INodeable[]): this; | ||
asOf(node: INodeable | string): this; | ||
leftJoin(other: INodeable): JoinNode; | ||
@@ -431,3 +431,3 @@ where(object: Partial<T> | Node[] | Node | string): this; | ||
} | ||
declare type SubQueryExtensions<T, C extends Record<string, any>> = { | ||
type SubQueryExtensions<T, C extends Record<string, any>> = { | ||
join: (other: INodeable) => JoinNode; | ||
@@ -439,3 +439,3 @@ } & { | ||
}; | ||
declare type SubQuery<T, C extends Record<string, any>> = Query<T> & SubQueryExtensions<T, C>; | ||
type SubQuery<T, C extends Record<string, any>> = Query<T> & SubQueryExtensions<T, C>; | ||
@@ -447,3 +447,3 @@ declare class TableNode extends Node { | ||
declare type TableWithColumns<T> = Table<T> & { | ||
type TableWithColumns<T> = Table<T> & { | ||
[Name in NonNullable<keyof T>]: Column<T[Name]>; | ||
@@ -703,4 +703,4 @@ }; | ||
declare const standardFunctionNames: readonly ["AVG", "COUNT", "DISTINCT", "MAX", "MIN", "SUM", "ABS", "COALESCE", "LEFT", "LENGTH", "LOWER", "LTRIM", "RANDOM", "RIGHT", "ROUND", "RTRIM", "SUBSTR", "TRIM", "UPPER", "HSTORE", "TS_RANK", "TS_RANK_CD", "PLAINTO_TSQUERY", "TO_TSQUERY", "TO_TSVECTOR", "SETWEIGHT", "YEAR", "MONTH", "DAY", "HOUR", "CURRENT_TIMESTAMP", "JSONB_ARRAY_LENGTH", "JSONB_BUILD_ARRAY", "JSONB_BUILD_OBECT", "JSONB_EXTRACT_PATH", "JSONB_INSERT", "JSONB_OBJECT", "JSONB_PRETTY", "JSONB_SET", "JSONB_STRIP_NULLS", "JSONB_TYPEOF", "TO_JSONB", "JSONB_ARRAY_ELEMENTS", "JSONB_ARRAY_ELEMENTS_TEXT", "JSONB_EACH", "JSONB_EACH_TEXT", "JSONB_OBJECT_KEYS", "JSONB_AGG"]; | ||
declare type StandardFunctions = { | ||
declare const standardFunctionNames: readonly ["AVG", "COUNT", "DISTINCT", "MAX", "MIN", "SUM", "ABS", "COALESCE", "LEFT", "LENGTH", "LOWER", "LTRIM", "RANDOM", "RIGHT", "ROUND", "RTRIM", "SUBSTR", "TRIM", "UPPER", "HSTORE", "TS_RANK", "TS_RANK_CD", "PLAINTO_TSQUERY", "TO_TSQUERY", "TO_TSVECTOR", "SETWEIGHT", "YEAR", "MONTH", "DAY", "HOUR", "CURRENT_TIMESTAMP", "JSONB_ARRAY_LENGTH", "JSONB_BUILD_ARRAY", "JSONB_BUILD_OBECT", "JSONB_EXTRACT_PATH", "JSONB_INSERT", "JSONB_OBJECT", "JSONB_PRETTY", "JSONB_SET", "JSONB_STRIP_NULLS", "JSONB_TYPEOF", "TO_JSONB", "JSONB_ARRAY_ELEMENTS", "JSONB_ARRAY_ELEMENTS_TEXT", "JSONB_EACH", "JSONB_EACH_TEXT", "JSONB_OBJECT_KEYS", "JSONB_AGG", "STATEMENT_TIMESTAMP", "FOLLOWER_READ_TIMESTAMP", "WITH_MIN_TIMESTAMP", "WITH_MAX_STALENESS"]; | ||
type StandardFunctions = { | ||
[K in (typeof standardFunctionNames)[number]]: (...args: any[]) => FunctionCallNode; | ||
@@ -975,2 +975,6 @@ }; | ||
declare class AsOfNode extends Node { | ||
constructor(); | ||
} | ||
declare abstract class Dialect<ConfigType> { | ||
@@ -1026,2 +1030,3 @@ protected config: ConfigType; | ||
visitFrom(fromNode: FromNode): string[]; | ||
visitAsOf(asOfNode: AsOfNode): string[]; | ||
visitWhere(whereNode: WhereNode): string[]; | ||
@@ -1133,2 +1138,3 @@ visitOrderBy(orderByNode: OrderByNode): string[]; | ||
_getParameterPlaceholder(index: string | number, value: any): string; | ||
visitAsOf(asOfNode: AsOfNode): string[]; | ||
visitReplace(replaceNode: ReplaceNode): string[]; | ||
@@ -1172,2 +1178,3 @@ visitBinary(binaryNode: BinaryNode): string[]; | ||
visitReplace(replaceNode: ReplaceNode): string[]; | ||
visitAsOf(asOfNode: AsOfNode): string[]; | ||
visitOnDuplicate(onDuplicateNode: OnDuplicateNode): string[]; | ||
@@ -1198,2 +1205,3 @@ visitOnConflict(onConflictNode: OnConflictNode): string[]; | ||
visitAlter(alterNode: AlterNode): string[]; | ||
visitAsOf(asOfNode: AsOfNode): string[]; | ||
visitTable(tableNode: TableNode): string[]; | ||
@@ -1245,2 +1253,3 @@ visitCascade(cascadeNode: CascadeNode): string[]; | ||
_getParameterValue(value: null | boolean | number | string | any[] | Date | Buffer | Record<string, any>, quoteChar?: string): string | number; | ||
visitAsOf(asOfNode: AsOfNode): string[]; | ||
visitReplace(replaceNode: ReplaceNode): string[]; | ||
@@ -1266,2 +1275,2 @@ visitDefault(defaultNode: DefaultNode): string[]; | ||
export { AddColumnNode, AliasMixin, AliasNode, AlterNode, ArrayCallNode, AtNode, BinaryNode, CascadeNode, CaseNode, CastNode, Column, ColumnNode, CreateIndexNode, CreateNode, CreateViewNode, DEFAULT_DIALECT, DefaultNode, DeleteNode, Dialect, DistinctNode, DistinctOnNode, DropColumnNode, DropIndexNode, DropNode, ForShareNode, ForUpdateNode, ForeignKeyNode, FromNode, FunctionCallNode, GroupByNode, HavingNode, IfExistsNode, IfNotExistsNode, InNode, IndexCreationQuery, IndexesNode, InsertNode, IntervalNode, JoinNode, LiteralNode, ModifierNode, Mssql, Mysql, Node, NotInNode, OnConflictNode, OnDuplicateNode, OrIgnoreNode, Oracle, OrderByNode, OrderByValueNode, ParameterNode, PostfixUnaryNode, Postgres, PrefixUnaryNode, Query, RenameColumnNode, RenameNode, ReplaceNode, RestrictNode, ReturningNode, RowCallNode, SelectNode, SliceNode, Sql, Sqlite, SubQuery, Table, TableNode, TableWithColumns, TernaryNode, TruncateNode, UpdateNode, WhereNode, getDialect, registerDialect }; | ||
export { AddColumnNode, AliasMixin, AliasNode, AlterNode, ArrayCallNode, AtNode, BinaryNode, CascadeNode, CaseNode, CastNode, Column, ColumnNode, CreateIndexNode, CreateNode, CreateViewNode, DEFAULT_DIALECT, DefaultNode, DeleteNode, Dialect, DistinctNode, DistinctOnNode, DropColumnNode, DropIndexNode, DropNode, ForShareNode, ForUpdateNode, ForeignKeyNode, FromNode, FunctionCallNode, GroupByNode, HavingNode, IfExistsNode, IfNotExistsNode, InNode, type IndexCreationQuery, IndexesNode, InsertNode, IntervalNode, JoinNode, LiteralNode, ModifierNode, Mssql, Mysql, Node, NotInNode, OnConflictNode, OnDuplicateNode, OrIgnoreNode, Oracle, OrderByNode, OrderByValueNode, ParameterNode, PostfixUnaryNode, Postgres, PrefixUnaryNode, Query, RenameColumnNode, RenameNode, ReplaceNode, RestrictNode, ReturningNode, RowCallNode, SelectNode, SliceNode, Sql, Sqlite, type SubQuery, Table, TableNode, type TableWithColumns, TernaryNode, TruncateNode, UpdateNode, WhereNode, getDialect, registerDialect }; |
@@ -8,3 +8,3 @@ { | ||
"description": "SQL Builder", | ||
"version": "6.3.0", | ||
"version": "7.0.0", | ||
"homepage": "https://github.com/charsleysa/node-sql-ts", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": "^12.20.0 || >=14.15.0" | ||
"node": "^18 || ^20 || >=22" | ||
}, | ||
@@ -35,22 +35,22 @@ "dependencies": { | ||
"sliced": "~1.0.x", | ||
"tslib": "~2.3.0" | ||
"tslib": "~2.7.0" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^8.2.1", | ||
"@types/lodash": "^4.14.170", | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.17.4", | ||
"@typescript-eslint/eslint-plugin": "^4.28.0", | ||
"@typescript-eslint/parser": "^4.28.0", | ||
"eslint": "^7.29.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-jsdoc": "^35.4.0", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/lodash": "^4.17.7", | ||
"@types/mocha": "^10.0.8", | ||
"@types/node": "^20.16.5", | ||
"@typescript-eslint/eslint-plugin": "^8.6.0", | ||
"@typescript-eslint/parser": "^8.6.0", | ||
"eslint": "^8.57.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.30.0", | ||
"eslint-plugin-jsdoc": "^50.2.4", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"eslint-plugin-unicorn": "^33.0.1", | ||
"mocha": "^9.0.1", | ||
"rollup-plugin-delete": "^2.0.0", | ||
"rollup-plugin-dts": "^3.0.2", | ||
"ts-node": "^10.0.0", | ||
"typescript": "^4.3.4" | ||
"eslint-plugin-unicorn": "^55.0.0", | ||
"mocha": "^10.7.3", | ||
"rollup-plugin-delete": "^2.1.0", | ||
"rollup-plugin-dts": "^6.1.1", | ||
"ts-node": "^10.9.2", | ||
"typescript": "~5.5.0" | ||
}, | ||
@@ -57,0 +57,0 @@ "mocha": { |
@@ -1,2 +0,2 @@ | ||
# node-sql-ts | ||
# sql-ts | ||
@@ -3,0 +3,0 @@ _sql string builder for node_ - supports PostgreSQL, mysql, Microsoft SQL Server, Oracle and sqlite dialects. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
367365
5785
+ Addedtslib@2.7.0(transitive)
- Removedtslib@2.3.1(transitive)
Updatedtslib@~2.7.0