node-pg-migrate
Advanced tools
Comparing version 5.5.1 to 5.6.0
# Change Log | ||
## [5.6.0](2020-08-19) | ||
### PgLiteral can be serialized | ||
- Do not try to unlock DB if connection failed [#678](https://github.com/salsita/node-pg-migrate/pull/678) | ||
## [5.5.1](2020-08-18) | ||
@@ -4,0 +10,0 @@ |
@@ -5,3 +5,3 @@ import runner from './runner'; | ||
import PgLiteral from './operations/PgLiteral'; | ||
import { Value, Name, Type, IfExistsOption, IfNotExistsOption, CascadeOption, DropOptions } from './operations/generalTypes'; | ||
import { PgLiteralValue, Value, Name, Type, IfExistsOption, IfNotExistsOption, CascadeOption, DropOptions } from './operations/generalTypes'; | ||
import { CreateDomain, DropDomain, AlterDomain, RenameDomain, DomainOptionsCreate, DomainOptionsAlter } from './operations/domainsTypes'; | ||
@@ -22,2 +22,2 @@ import { CreateExtension, DropExtension, Extension, CreateExtensionOptions } from './operations/extensionsTypes'; | ||
import { CreateMaterializedView, DropMaterializedView, AlterMaterializedView, RenameMaterializedView, RenameMaterializedViewColumn, RefreshMaterializedView, CreateMaterializedViewOptions, AlterMaterializedViewOptions, RefreshMaterializedViewOptions } from './operations/viewsMaterializedTypes'; | ||
export { runner as default, PgLiteral, Migration, PgType, MigrationBuilder, RunnerOption, Value, Name, Type, IfExistsOption, IfNotExistsOption, CascadeOption, DropOptions, CreateTable, DropTable, AlterTable, RenameTable, AddColumns, DropColumns, AlterColumn, RenameColumn, CreateConstraint, DropConstraint, RenameConstraint, ColumnDefinition, ColumnDefinitions, TableOptions, AlterTableOptions, AlterColumnOptions, ConstraintOptions, CreateDomain, DropDomain, AlterDomain, RenameDomain, DomainOptionsCreate, DomainOptionsAlter, CreateExtension, DropExtension, Extension, CreateExtensionOptions, CreateFunction, DropFunction, RenameFunction, FunctionParam, FunctionOptions, DropIndex, CreateIndex, CreateIndexOptions, DropIndexOptions, CreateOperator, DropOperator, CreateOperatorClass, DropOperatorClass, RenameOperatorClass, CreateOperatorFamily, DropOperatorFamily, AddToOperatorFamily, RenameOperatorFamily, RemoveFromOperatorFamily, CreateOperatorOptions, DropOperatorOptions, OperatorListDefinition, CreateOperatorClassOptions, Sql, CreatePolicy, DropPolicy, AlterPolicy, RenamePolicy, CreatePolicyOptions, PolicyOptions, CreateRole, DropRole, AlterRole, RenameRole, RoleOptions, CreateSequence, DropSequence, AlterSequence, RenameSequence, SequenceOptionsCreate, SequenceOptionsAlter, CreateSchema, DropSchema, RenameSchema, CreateSchemaOptions, CreateTrigger, DropTrigger, RenameTrigger, TriggerOptions, CreateType, DropType, RenameType, AddTypeAttribute, DropTypeAttribute, SetTypeAttribute, AddTypeValue, RenameTypeAttribute, RenameTypeValue, AddTypeValueOptions, CreateView, DropView, AlterView, AlterViewColumn, RenameView, CreateViewOptions, AlterViewOptions, AlterViewColumnOptions, CreateMaterializedView, DropMaterializedView, AlterMaterializedView, RenameMaterializedView, RenameMaterializedViewColumn, RefreshMaterializedView, CreateMaterializedViewOptions, AlterMaterializedViewOptions, RefreshMaterializedViewOptions, }; | ||
export { runner as default, PgLiteral, Migration, PgType, MigrationBuilder, RunnerOption, PgLiteralValue, Value, Name, Type, IfExistsOption, IfNotExistsOption, CascadeOption, DropOptions, CreateTable, DropTable, AlterTable, RenameTable, AddColumns, DropColumns, AlterColumn, RenameColumn, CreateConstraint, DropConstraint, RenameConstraint, ColumnDefinition, ColumnDefinitions, TableOptions, AlterTableOptions, AlterColumnOptions, ConstraintOptions, CreateDomain, DropDomain, AlterDomain, RenameDomain, DomainOptionsCreate, DomainOptionsAlter, CreateExtension, DropExtension, Extension, CreateExtensionOptions, CreateFunction, DropFunction, RenameFunction, FunctionParam, FunctionOptions, DropIndex, CreateIndex, CreateIndexOptions, DropIndexOptions, CreateOperator, DropOperator, CreateOperatorClass, DropOperatorClass, RenameOperatorClass, CreateOperatorFamily, DropOperatorFamily, AddToOperatorFamily, RenameOperatorFamily, RemoveFromOperatorFamily, CreateOperatorOptions, DropOperatorOptions, OperatorListDefinition, CreateOperatorClassOptions, Sql, CreatePolicy, DropPolicy, AlterPolicy, RenamePolicy, CreatePolicyOptions, PolicyOptions, CreateRole, DropRole, AlterRole, RenameRole, RoleOptions, CreateSequence, DropSequence, AlterSequence, RenameSequence, SequenceOptionsCreate, SequenceOptionsAlter, CreateSchema, DropSchema, RenameSchema, CreateSchemaOptions, CreateTrigger, DropTrigger, RenameTrigger, TriggerOptions, CreateType, DropType, RenameType, AddTypeAttribute, DropTypeAttribute, SetTypeAttribute, AddTypeValue, RenameTypeAttribute, RenameTypeValue, AddTypeValueOptions, CreateView, DropView, AlterView, AlterViewColumn, RenameView, CreateViewOptions, AlterViewOptions, AlterViewColumnOptions, CreateMaterializedView, DropMaterializedView, AlterMaterializedView, RenameMaterializedView, RenameMaterializedViewColumn, RefreshMaterializedView, CreateMaterializedViewOptions, AlterMaterializedViewOptions, RefreshMaterializedViewOptions, }; |
@@ -5,6 +5,10 @@ import PgLiteral from './PgLiteral'; | ||
}); | ||
export declare type PublicPart<T> = { | ||
[K in keyof T]: T[K]; | ||
}; | ||
export declare type Nullable<T> = { | ||
[P in keyof T]: T[P] | null; | ||
}; | ||
export declare type Value = null | boolean | string | number | PgLiteral | Value[]; | ||
export declare type PgLiteralValue = PublicPart<PgLiteral>; | ||
export declare type Value = null | boolean | string | number | PgLiteral | PgLiteralValue | Value[]; | ||
export declare type Type = string | { | ||
@@ -11,0 +15,0 @@ type: string; |
export default class PgLiteral { | ||
readonly value: string; | ||
static create(str: string): PgLiteral; | ||
private readonly _str; | ||
constructor(str: string); | ||
readonly literal = true; | ||
constructor(value: string); | ||
toString(): string; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
class PgLiteral { | ||
constructor(str) { | ||
this._str = str; | ||
constructor(value) { | ||
this.value = value; | ||
this.literal = true; | ||
} | ||
@@ -11,5 +12,5 @@ static create(str) { | ||
toString() { | ||
return this._str; | ||
return this.value; | ||
} | ||
} | ||
exports.default = PgLiteral; |
@@ -8,3 +8,2 @@ "use strict"; | ||
const decamelize_1 = __importDefault(require("decamelize")); | ||
const PgLiteral_1 = __importDefault(require("./operations/PgLiteral")); | ||
const identity = (v) => v; | ||
@@ -46,4 +45,4 @@ const quote = (str) => `"${str}"`; | ||
} | ||
if (val instanceof PgLiteral_1.default) { | ||
return val.toString(); | ||
if (typeof val === 'object' && val.literal) { | ||
return val.value; | ||
} | ||
@@ -50,0 +49,0 @@ return ''; |
{ | ||
"name": "node-pg-migrate", | ||
"version": "5.5.1", | ||
"version": "5.6.0", | ||
"description": "Postgresql database migration management tool for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Theo Ephraim", |
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
286779
3460