Comparing version 1.0.0-beta.1 to 1.0.0-beta.2
@@ -52,4 +52,4 @@ /* SQB | ||
ParamType.COLON; | ||
config.prettyPrint = config.prettyPrint === false ? config.prettyPrint : | ||
config.prettyPrint || true; | ||
config.prettyPrint = | ||
config.prettyPrint === undefined ? true : !!config.prettyPrint; | ||
} | ||
@@ -697,13 +697,16 @@ | ||
case ParamType.COLON: | ||
case undefined: | ||
case ParamType.AT: | ||
case undefined: { | ||
const sign = this.config.paramType === ParamType.COLON ? ':' : '@'; | ||
if (multi) { | ||
s = ':' + prm + '1 and :' + prm + '2'; | ||
s = sign + prm + '1 and :' + prm + '2'; | ||
outParams[prm + '1'] = (valIsArray ? prmValue[0] : prmValue); | ||
outParams[prm + '2'] = (valIsArray ? prmValue[1] : prmValue); | ||
} else { | ||
s = ':' + prm; | ||
s = sign + prm; | ||
outParams[prm] = prmValue == null ? null : prmValue; | ||
} | ||
break; | ||
case ParamType.DOLLAR: | ||
} | ||
case ParamType.DOLLAR: { | ||
if (multi) { | ||
@@ -719,3 +722,4 @@ s = '$' + (outParams.length + 1) + ' and ' + | ||
break; | ||
case ParamType.QUESTION_MARK: | ||
} | ||
case ParamType.QUESTION_MARK: { | ||
if (multi) { | ||
@@ -730,2 +734,3 @@ s = '? and ?'; | ||
break; | ||
} | ||
} | ||
@@ -732,0 +737,0 @@ return s; |
@@ -21,2 +21,5 @@ /* SQB | ||
/** @export */ | ||
ParamType.AT = /** @type {!ParamType} */ (3); | ||
/** @export @enum {number} */ | ||
@@ -23,0 +26,0 @@ const JoinType = {}; |
{ | ||
"name": "sqb", | ||
"description": "Plugin-driven, multi-dialect SQL query builder and Database connection framework for JavaScript", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0-beta.2", | ||
"author": "Panates Ltd.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
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
107819
3603