pg-promise
Advanced tools
Comparing version 10.8.4 to 10.8.5
{ | ||
"name": "pg-promise", | ||
"version": "10.8.4", | ||
"version": "10.8.5", | ||
"description": "PostgreSQL interface for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -87,4 +87,4 @@ /* | ||
interface IColumnDescriptor<S = any> { | ||
source: S | ||
interface IColumnDescriptor<T> { | ||
source: T | ||
name: string | ||
@@ -95,3 +95,3 @@ value: any | ||
interface IColumnConfig<S = any> { | ||
interface IColumnConfig<T> { | ||
name: string | ||
@@ -104,5 +104,5 @@ prop?: string | ||
init?(col: IColumnDescriptor<S>): any | ||
init?(col: IColumnDescriptor<T>): any | ||
skip?(col: IColumnDescriptor<S>): boolean | ||
skip?(col: IColumnDescriptor<T>): boolean | ||
} | ||
@@ -132,3 +132,3 @@ | ||
type QueryColumns = Column | ColumnSet | Array<string | IColumnConfig | Column>; | ||
type QueryColumns<T> = Column<T> | ColumnSet<T> | Array<string | IColumnConfig<T> | Column<T>>; | ||
@@ -161,4 +161,4 @@ type QueryParam = | ||
// API: http://vitaly-t.github.io/pg-promise/helpers.Column.html | ||
class Column<S = any> { | ||
constructor(col: string | IColumnConfig<S>); | ||
class Column<T = unknown> { | ||
constructor(col: string | IColumnConfig<T>); | ||
@@ -174,4 +174,4 @@ // these are all read-only: | ||
readonly escapedName: string; | ||
readonly init: (col: IColumnDescriptor<S>) => any | ||
readonly skip: (col: IColumnDescriptor<S>) => boolean | ||
readonly init: (col: IColumnDescriptor<T>) => any | ||
readonly skip: (col: IColumnDescriptor<T>) => boolean | ||
@@ -183,8 +183,8 @@ toString(level?: number): string | ||
// API: http://vitaly-t.github.io/pg-promise/helpers.ColumnSet.html | ||
class ColumnSet<S = any> { | ||
constructor(columns: Column<S>, options?: IColumnSetOptions) | ||
constructor(columns: Array<string | IColumnConfig<S> | Column<S>>, options?: IColumnSetOptions) | ||
class ColumnSet<T = unknown> { | ||
constructor(columns: Column<T>, options?: IColumnSetOptions) | ||
constructor(columns: Array<string | IColumnConfig<T> | Column<T>>, options?: IColumnSetOptions) | ||
constructor(columns: object, options?: IColumnSetOptions) | ||
readonly columns: Column<S>[]; | ||
readonly columns: Column<T>[]; | ||
readonly names: string; | ||
@@ -196,7 +196,7 @@ readonly table: TableName; | ||
assignColumns(options?: { from?: string, to?: string, skip?: string | string[] | ((c: Column<S>) => boolean) }): string | ||
assignColumns(options?: { from?: string, to?: string, skip?: string | string[] | ((c: Column<T>) => boolean) }): string | ||
extend(columns: Column | ColumnSet | Array<string | IColumnConfig | Column>): ColumnSet | ||
extend<S>(columns: Column<T> | ColumnSet<T> | Array<string | IColumnConfig<T> | Column<T>>): ColumnSet<S> | ||
merge(columns: Column | ColumnSet | Array<string | IColumnConfig | Column>): ColumnSet | ||
merge<S>(columns: Column<T> | ColumnSet<T> | Array<string | IColumnConfig<T> | Column<T>>): ColumnSet<S> | ||
@@ -672,9 +672,9 @@ prepare(obj: object): object | ||
insert(data: object | object[], columns?: QueryColumns | null, table?: string | ITable | TableName): string | ||
insert(data: object | object[], columns?: QueryColumns<any> | null, table?: string | ITable | TableName): string | ||
update(data: object | object[], columns?: QueryColumns | null, table?: string | ITable | TableName, options?: { tableAlias?: string, valueAlias?: string, emptyUpdate?: any }): any | ||
update(data: object | object[], columns?: QueryColumns<any> | null, table?: string | ITable | TableName, options?: { tableAlias?: string, valueAlias?: string, emptyUpdate?: any }): any | ||
values(data: object | object[], columns?: QueryColumns | null): string | ||
values(data: object | object[], columns?: QueryColumns<any> | null): string | ||
sets(data: object, columns?: QueryColumns | null): string | ||
sets(data: object, columns?: QueryColumns<any> | null): string | ||
@@ -681,0 +681,0 @@ Column: typeof Column |
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
420247