@balena/abstract-sql-compiler
Advanced tools
Comparing version 9.1.4-build-joshbwlng-big-serial-cast-792c508e2f60d1d9820a18497e0192e6941545f4-1 to 9.1.4-build-joshbwlng-big-serial-cast-9e4025dd57517f4ad6d06f4cb894062c6ce370cf-1
@@ -767,5 +767,8 @@ "use strict"; | ||
} | ||
else if (['SERIAL', 'BIGSERIAL'].includes(dbType.toUpperCase())) { | ||
else if (dbType.toUpperCase() === 'SERIAL') { | ||
type = 'INTEGER'; | ||
} | ||
else if (dbType.toUpperCase() === 'BIGSERIAL') { | ||
type = 'BIGINT'; | ||
} | ||
else { | ||
@@ -772,0 +775,0 @@ type = dbType; |
{ | ||
"name": "@balena/abstract-sql-compiler", | ||
"version": "9.1.4-build-joshbwlng-big-serial-cast-792c508e2f60d1d9820a18497e0192e6941545f4-1", | ||
"version": "9.1.4-build-joshbwlng-big-serial-cast-9e4025dd57517f4ad6d06f4cb894062c6ce370cf-1", | ||
"description": "A translator for abstract sql into sql.", | ||
@@ -64,4 +64,4 @@ "main": "out/AbstractSQLCompiler.js", | ||
"versionist": { | ||
"publishedAt": "2024-04-09T04:03:43.379Z" | ||
"publishedAt": "2024-04-09T09:38:55.463Z" | ||
} | ||
} |
@@ -879,6 +879,10 @@ import * as _ from 'lodash'; | ||
type = dbType.castType; | ||
} else if (['SERIAL', 'BIGSERIAL'].includes(dbType.toUpperCase())) { | ||
// HACK: SERIAL and BIGSERIAL types in postgres are really an INTEGER with automatic sequence, | ||
// so it's not actually possible to cast to SERIAL or BIGSERIAL, instead you have to cast to INTEGER. | ||
} else if (dbType.toUpperCase() === 'SERIAL') { | ||
// HACK: SERIAL type in postgres is really an INTEGER with automatic sequence, | ||
// so it's not actually possible to cast to SERIAL, instead you have to cast to INTEGER. | ||
type = 'INTEGER'; | ||
} else if (dbType.toUpperCase() === 'BIGSERIAL') { | ||
// HACK: BIGSERIAL type in postgres is really a BIGINT with automatic sequence, | ||
// so it's not actually possible to cast to BIGSERIAL, instead you have to cast to BIGINT. | ||
type = 'BIGINT'; | ||
} else { | ||
@@ -885,0 +889,0 @@ type = dbType; |
Sorry, the diff of this file is not supported yet
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
849176
17923
47