foxhound 2.0.24 → 2.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxhound",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.25",
|
|
4
4
|
"description": "A Database Query generation library.",
|
|
5
5
|
"main": "source/FoxHound.js",
|
|
6
6
|
"scripts": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://github.com/stevenvelozo/foxhound",
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"quackage": "^1.0.
|
|
51
|
+
"quackage": "^1.0.63"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"fable": "^3.1.63",
|
|
@@ -554,17 +554,19 @@ var FoxHoundDialectMSSQL = function(pFable)
|
|
|
554
554
|
break;
|
|
555
555
|
case 'JSON':
|
|
556
556
|
var tmpJSONUpdateParam = tmpColumn+'_'+tmpCurrentColumn;
|
|
557
|
-
tmpUpdate += ' '+tmpColumn+' =
|
|
557
|
+
tmpUpdate += ' ['+tmpColumn+'] = @'+tmpJSONUpdateParam;
|
|
558
558
|
pParameters.query.parameters[tmpJSONUpdateParam] = (typeof tmpRecords[0][tmpColumn] === 'string')
|
|
559
559
|
? tmpRecords[0][tmpColumn]
|
|
560
560
|
: JSON.stringify(tmpRecords[0][tmpColumn] || {});
|
|
561
|
+
generateMSSQLParameterTypeEntry(pParameters, tmpJSONUpdateParam, {Type:'String'});
|
|
561
562
|
break;
|
|
562
563
|
case 'JSONProxy':
|
|
563
564
|
var tmpProxyUpdateParam = tmpSchemaEntry.StorageColumn+'_'+tmpCurrentColumn;
|
|
564
|
-
tmpUpdate += ' '+tmpSchemaEntry.StorageColumn+' =
|
|
565
|
+
tmpUpdate += ' ['+tmpSchemaEntry.StorageColumn+'] = @'+tmpProxyUpdateParam;
|
|
565
566
|
pParameters.query.parameters[tmpProxyUpdateParam] = (typeof tmpRecords[0][tmpColumn] === 'string')
|
|
566
567
|
? tmpRecords[0][tmpColumn]
|
|
567
568
|
: JSON.stringify(tmpRecords[0][tmpColumn] || {});
|
|
569
|
+
generateMSSQLParameterTypeEntry(pParameters, tmpProxyUpdateParam, {Type:'String'});
|
|
568
570
|
break;
|
|
569
571
|
default:
|
|
570
572
|
var tmpColumnDefaultParameter = tmpColumn+'_'+tmpCurrentColumn;
|
|
@@ -867,17 +869,19 @@ var FoxHoundDialectMSSQL = function(pFable)
|
|
|
867
869
|
break;
|
|
868
870
|
case 'JSON':
|
|
869
871
|
var tmpJSONCreateParam = tmpColumn+'_'+tmpCurrentColumn;
|
|
870
|
-
tmpCreateSet += '
|
|
872
|
+
tmpCreateSet += ' @'+tmpJSONCreateParam;
|
|
871
873
|
pParameters.query.parameters[tmpJSONCreateParam] = (typeof tmpRecords[0][tmpColumn] === 'string')
|
|
872
874
|
? tmpRecords[0][tmpColumn]
|
|
873
875
|
: JSON.stringify(tmpRecords[0][tmpColumn] || {});
|
|
876
|
+
generateMSSQLParameterTypeEntry(pParameters, tmpJSONCreateParam, {Type:'String'});
|
|
874
877
|
break;
|
|
875
878
|
case 'JSONProxy':
|
|
876
879
|
var tmpProxyCreateParam = tmpColumn+'_'+tmpCurrentColumn;
|
|
877
|
-
tmpCreateSet += '
|
|
880
|
+
tmpCreateSet += ' @'+tmpProxyCreateParam;
|
|
878
881
|
pParameters.query.parameters[tmpProxyCreateParam] = (typeof tmpRecords[0][tmpColumn] === 'string')
|
|
879
882
|
? tmpRecords[0][tmpColumn]
|
|
880
883
|
: JSON.stringify(tmpRecords[0][tmpColumn] || {});
|
|
884
|
+
generateMSSQLParameterTypeEntry(pParameters, tmpProxyCreateParam, {Type:'String'});
|
|
881
885
|
break;
|
|
882
886
|
default:
|
|
883
887
|
buildDefaultDefinition();
|
|
@@ -955,14 +959,14 @@ var FoxHoundDialectMSSQL = function(pFable)
|
|
|
955
959
|
{
|
|
956
960
|
tmpCreateSet += ',';
|
|
957
961
|
}
|
|
958
|
-
tmpCreateSet += ' '+tmpColumn;
|
|
962
|
+
tmpCreateSet += ' ['+tmpColumn+']';
|
|
959
963
|
break;
|
|
960
964
|
case 'JSONProxy':
|
|
961
965
|
if (tmpCreateSet != '')
|
|
962
966
|
{
|
|
963
967
|
tmpCreateSet += ',';
|
|
964
968
|
}
|
|
965
|
-
tmpCreateSet += ' '+tmpSchemaEntry.StorageColumn;
|
|
969
|
+
tmpCreateSet += ' ['+tmpSchemaEntry.StorageColumn+']';
|
|
966
970
|
break;
|
|
967
971
|
default:
|
|
968
972
|
if (tmpCreateSet != '')
|
|
@@ -434,14 +434,14 @@ var FoxHoundDialectPostgreSQL = function(pFable)
|
|
|
434
434
|
break;
|
|
435
435
|
case 'JSON':
|
|
436
436
|
var tmpJSONUpdateParam = tmpColumn+'_'+tmpCurrentColumn;
|
|
437
|
-
tmpUpdate += ' '+tmpColumn+' = :'+tmpJSONUpdateParam;
|
|
437
|
+
tmpUpdate += ' '+generateSafeFieldName(tmpColumn)+' = :'+tmpJSONUpdateParam;
|
|
438
438
|
pParameters.query.parameters[tmpJSONUpdateParam] = (typeof tmpRecords[0][tmpColumn] === 'string')
|
|
439
439
|
? tmpRecords[0][tmpColumn]
|
|
440
440
|
: JSON.stringify(tmpRecords[0][tmpColumn] || {});
|
|
441
441
|
break;
|
|
442
442
|
case 'JSONProxy':
|
|
443
443
|
var tmpProxyUpdateParam = tmpSchemaEntry.StorageColumn+'_'+tmpCurrentColumn;
|
|
444
|
-
tmpUpdate += ' '+tmpSchemaEntry.StorageColumn+' = :'+tmpProxyUpdateParam;
|
|
444
|
+
tmpUpdate += ' '+generateSafeFieldName(tmpSchemaEntry.StorageColumn)+' = :'+tmpProxyUpdateParam;
|
|
445
445
|
pParameters.query.parameters[tmpProxyUpdateParam] = (typeof tmpRecords[0][tmpColumn] === 'string')
|
|
446
446
|
? tmpRecords[0][tmpColumn]
|
|
447
447
|
: JSON.stringify(tmpRecords[0][tmpColumn] || {});
|
|
@@ -768,14 +768,14 @@ var FoxHoundDialectPostgreSQL = function(pFable)
|
|
|
768
768
|
{
|
|
769
769
|
tmpCreateSet += ',';
|
|
770
770
|
}
|
|
771
|
-
tmpCreateSet += ' '+tmpColumn;
|
|
771
|
+
tmpCreateSet += ' '+generateSafeFieldName(tmpColumn);
|
|
772
772
|
break;
|
|
773
773
|
case 'JSONProxy':
|
|
774
774
|
if (tmpCreateSet != '')
|
|
775
775
|
{
|
|
776
776
|
tmpCreateSet += ',';
|
|
777
777
|
}
|
|
778
|
-
tmpCreateSet += ' '+tmpSchemaEntry.StorageColumn;
|
|
778
|
+
tmpCreateSet += ' '+generateSafeFieldName(tmpSchemaEntry.StorageColumn);
|
|
779
779
|
break;
|
|
780
780
|
default:
|
|
781
781
|
if (tmpCreateSet != '')
|