Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

febs-db

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

febs-db - npm Package Compare versions

Comparing version 1.4.6 to 1.4.7

42

lib/dataType.js

@@ -17,3 +17,3 @@ 'use strict';

*/
getType (value) { if (typeof value === 'function') return value; return value.type; },
getType (value) { if (typeof value === 'string') return value; return value.type; },

@@ -23,3 +23,3 @@ /**

*/
isIntegerType (value) { let type = this.getType(value); return type === this.BigInt || type === this.TinyInt || type === this.SmallInt || type === this.Int; },
isIntegerType (value) { let type = this.getType(value); return type === 'TYPES.BigInt' || type === 'TYPES.TinyInt' || type === 'TYPES.SmallInt' || type === 'TYPES.Int'; },

@@ -29,3 +29,3 @@ /**

*/
isStringType (value) { let type = this.getType(value); return type === this.VarChar || type === this.NVarChar || type === this.Text || type === this.NText || type === this.Char || type === this.NChar; },
isStringType (value) { let type = this.getType(value); return type === 'TYPES.VarChar' || type === 'TYPES.NVarChar' || type === 'TYPES.Text' || type === 'TYPES.NText' || type === 'TYPES.Char' || type === 'TYPES.NChar'; },

@@ -62,8 +62,8 @@ /**

*/
VarChar (length = Number.MAX_SAFE_INTEGER) { return {type: TYPES.VarChar, length} },
NVarChar (length = Number.MAX_SAFE_INTEGER) { return {type: TYPES.NVarChar, length} },
Text () { return {type: TYPES.Text} },
NText () { return {type: TYPES.NText} },
Char (length = Number.MAX_SAFE_INTEGER) { return {type: TYPES.Char, length} },
NChar (length = Number.MAX_SAFE_INTEGER) { return {type: TYPES.NChar, length} },
VarChar (length = Number.MAX_SAFE_INTEGER) { return {type: 'TYPES.VarChar', length} },
NVarChar (length = Number.MAX_SAFE_INTEGER) { return {type: 'TYPES.NVarChar', length} },
Text () { return {type: 'TYPES.Text'} },
NText () { return {type: 'TYPES.NText'} },
Char (length = Number.MAX_SAFE_INTEGER) { return {type: 'TYPES.Char', length} },
NChar (length = Number.MAX_SAFE_INTEGER) { return {type: 'TYPES.NChar', length} },

@@ -73,3 +73,3 @@ /**

*/
Bit () { return {type: TYPES.Bit} },
Bit () { return {type: 'TYPES.Bit'} },

@@ -79,3 +79,3 @@ /**

*/
BigInt (unsigned = false) { return {type: TYPES.BigInt, unsigned} },
BigInt (unsigned = false) { return {type: 'TYPES.BigInt', unsigned} },

@@ -85,9 +85,9 @@ /**

*/
TinyInt (unsigned = false) { return {type: TYPES.TinyInt, unsigned} },
SmallInt (unsigned = false) { return {type: TYPES.SmallInt, unsigned} },
Int (unsigned = false) { return {type: TYPES.Int, unsigned} },
Float (unsigned = false) { return {type: TYPES.Float, unsigned} },
Numeric (unsigned = false, precision = 7, scale = 2) { return {type: TYPES.Numeric, precision, scale, unsigned} },
Decimal (unsigned = false, precision = 7, scale = 2) { return {type: TYPES.Decimal, precision, scale, unsigned} },
Real (unsigned = false) { return {type: TYPES.Real, unsigned} },
TinyInt (unsigned = false) { return {type: 'TYPES.TinyInt', unsigned} },
SmallInt (unsigned = false) { return {type: 'TYPES.SmallInt', unsigned} },
Int (unsigned = false) { return {type: 'TYPES.Int', unsigned} },
Float (unsigned = false) { return {type: 'TYPES.Float', unsigned} },
Numeric (unsigned = false, precision = 7, scale = 2) { return {type: 'TYPES.Numeric', precision, scale, unsigned} },
Decimal (unsigned = false, precision = 7, scale = 2) { return {type: 'TYPES.Decimal', precision, scale, unsigned} },
Real (unsigned = false) { return {type: 'TYPES.Real', unsigned} },

@@ -101,3 +101,3 @@ /**

*/
DateTime () { return {type: TYPES.DateTime} },
DateTime () { return {type: 'TYPES.DateTime'} },

@@ -107,4 +107,4 @@ /**

*/
Binary (length = Number.MAX_SAFE_INTEGER) { return {type: TYPES.Binary, length} },
VarBinary (length = Number.MAX_SAFE_INTEGER) { return {type: TYPES.VarBinary, length} },
Binary (length = Number.MAX_SAFE_INTEGER) { return {type: 'TYPES.Binary', length} },
VarBinary (length = Number.MAX_SAFE_INTEGER) { return {type: 'TYPES.VarBinary', length} },
}

@@ -111,0 +111,0 @@

@@ -31,3 +31,3 @@ 'use strict';

//
if (c_type === TYPES.BigInt) {
if (c_type === 'TYPES.BigInt') {
if (Number.isInteger(value))

@@ -57,3 +57,3 @@ {

//
if (c_type === TYPES.TinyInt) {
if (c_type === 'TYPES.TinyInt') {
let tValue = Number(value);

@@ -74,3 +74,3 @@ if (!Number.isInteger(tValue))

//
if (c_type === TYPES.SmallInt) {
if (c_type === 'TYPES.SmallInt') {
let tValue = Number(value);

@@ -91,3 +91,3 @@ if (!Number.isInteger(tValue))

//
if (c_type === TYPES.Int) {
if (c_type === 'TYPES.Int') {
let tValue = Number(value);

@@ -108,3 +108,3 @@ if (!Number.isInteger(tValue))

//
if (c_type === TYPES.Float) {
if (c_type === 'TYPES.Float') {
let tValue = Number(value);

@@ -120,3 +120,3 @@ if (c_unsigned) {

//
if (c_type === TYPES.Numeric) {
if (c_type === 'TYPES.Numeric') {
let tValue = Number(value);

@@ -132,3 +132,3 @@ if (c_unsigned) {

//
if (c_type === TYPES.Decimal) {
if (c_type === 'TYPES.Decimal') {
let tValue = Number(value);

@@ -144,3 +144,3 @@ if (c_unsigned) {

//
if (c_type === TYPES.Real) {
if (c_type === 'TYPES.Real') {
let tValue = Number(value);

@@ -174,3 +174,3 @@ if (c_unsigned) {

if (typeof type === 'function') {
if (typeof type === 'string') {
c_type = type;

@@ -196,8 +196,8 @@ } else {

if (
(c_type !== TYPES.VarChar &&
c_type !== TYPES.NVarChar &&
c_type !== TYPES.Text &&
c_type !== TYPES.NText &&
c_type !== TYPES.Char &&
c_type !== TYPES.NChar)
(c_type !== 'TYPES.VarChar' &&
c_type !== 'TYPES.NVarChar' &&
c_type !== 'TYPES.Text' &&
c_type !== 'TYPES.NText' &&
c_type !== 'TYPES.Char' &&
c_type !== 'TYPES.NChar')
)

@@ -210,5 +210,5 @@ throw new exception(`PARAM ${colName} type error , in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type === TYPES.VarChar ||
c_type === TYPES.Text ||
c_type === TYPES.Char)
(c_type === 'TYPES.VarChar' ||
c_type === 'TYPES.Text' ||
c_type === 'TYPES.Char')
)

@@ -221,3 +221,3 @@ return escape(value);

if (
(c_type !== TYPES.Bit)
(c_type !== 'TYPES.Bit')
)

@@ -239,3 +239,3 @@ throw new exception(`PARAM ${colName} type error , in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type !== TYPES.DateTime)
(c_type !== 'TYPES.DateTime')
)

@@ -250,3 +250,3 @@ throw new exception(`PARAM ${colName} type error , in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type !== TYPES.BigInt)
(c_type !== 'TYPES.BigInt')
)

@@ -265,4 +265,4 @@ throw new exception(`PARAM ${colName} type error , in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type !== TYPES.Binary) &&
(c_type !== TYPES.VarBinary)
(c_type !== 'TYPES.Binary') &&
(c_type !== 'TYPES.VarBinary')
)

@@ -269,0 +269,0 @@ throw new exception(`PARAM ${colName} type error , in VALUE ${value}`, exception.PARAM, __filename, __line);

@@ -28,3 +28,3 @@ 'use strict';

//
if (c_type === TYPES.BigInt) {
if (c_type === 'TYPES.BigInt') {
if (Number.isInteger(value))

@@ -54,3 +54,3 @@ {

//
if (c_type === TYPES.TinyInt) {
if (c_type === 'TYPES.TinyInt') {
let tValue = Number(value);

@@ -75,3 +75,3 @@ if (!Number.isInteger(tValue))

//
if (c_type === TYPES.SmallInt) {
if (c_type === 'TYPES.SmallInt') {
let tValue = Number(value);

@@ -96,3 +96,3 @@ if (!Number.isInteger(tValue))

//
if (c_type === TYPES.Int) {
if (c_type === 'TYPES.Int') {
let tValue = Number(value);

@@ -117,3 +117,3 @@ if (!Number.isInteger(tValue))

//
if (c_type === TYPES.Float) {
if (c_type === 'TYPES.Float') {
let tValue = Number(value);

@@ -129,3 +129,3 @@ if (c_unsigned) {

//
if (c_type === TYPES.Numeric) {
if (c_type === 'TYPES.Numeric') {
let tValue = Number(value);

@@ -141,3 +141,3 @@ if (c_unsigned) {

//
if (c_type === TYPES.Decimal) {
if (c_type === 'TYPES.Decimal') {
let tValue = Number(value);

@@ -153,3 +153,3 @@ if (c_unsigned) {

//
if (c_type === TYPES.Real) {
if (c_type === 'TYPES.Real') {
let tValue = Number(value);

@@ -183,3 +183,3 @@ if (c_unsigned) {

if (typeof type === 'function') {
if (typeof type === 'string') {
c_type = type;

@@ -205,8 +205,8 @@ } else {

if (
(c_type !== TYPES.VarChar &&
c_type !== TYPES.NVarChar &&
c_type !== TYPES.Text &&
c_type !== TYPES.NText &&
c_type !== TYPES.Char &&
c_type !== TYPES.NChar)
(c_type !== 'TYPES.VarChar' &&
c_type !== 'TYPES.NVarChar' &&
c_type !== 'TYPES.Text' &&
c_type !== 'TYPES.NText' &&
c_type !== 'TYPES.Char' &&
c_type !== 'TYPES.NChar')
)

@@ -222,3 +222,3 @@ throw new exception(`PARAM ${colName} type error ,in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type !== TYPES.Bit)
(c_type !== 'TYPES.Bit')
)

@@ -240,3 +240,3 @@ throw new exception(`PARAM ${colName} type error ,in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type !== TYPES.DateTime)
(c_type !== 'TYPES.DateTime')
)

@@ -251,3 +251,3 @@ throw new exception(`PARAM ${colName} type error ,in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type !== TYPES.BigInt)
(c_type !== 'TYPES.BigInt')
)

@@ -267,4 +267,4 @@ throw new exception(`PARAM ${colName} type error ,in VALUE ${value}`, exception.PARAM, __filename, __line);

if (
(c_type !== TYPES.Binary) &&
(c_type !== TYPES.VarBinary)
(c_type !== 'TYPES.Binary') &&
(c_type !== 'TYPES.VarBinary')
)

@@ -271,0 +271,0 @@ throw new exception(`PARAM ${colName} type error ,in VALUE ${value}`, exception.PARAM, __filename, __line);

@@ -53,3 +53,3 @@ {

},
"version": "1.4.6"
"version": "1.4.7"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc