meadow 2.0.12 → 2.0.13
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
|
@@ -65,14 +65,14 @@ var MeadowProvider = function ()
|
|
|
65
65
|
let tmpParameterType = pQuery.query.parameterTypes[tmpParameterTypeKeys[i]];
|
|
66
66
|
if (_Fable.MeadowMSSQLProvider.MSSQL[tmpParameterType] === undefined)
|
|
67
67
|
{
|
|
68
|
-
tmpParameterType = '
|
|
68
|
+
tmpParameterType = 'VarChar';
|
|
69
69
|
}
|
|
70
70
|
// TODO: Decide how to filter better cleansing to this layer from the schema; we have access to proper lengths.
|
|
71
71
|
// BEFORE WE ADD THIS BEHAVIOR, DECIDE CONCISTENCY WITH OTHER PROVIDERS WHO ALLOW OVERFLOWING STRINGS
|
|
72
72
|
let tmpParameterEntry = false;
|
|
73
73
|
if ((tmpParameterType === 'Char') || (tmpParameterType === 'VarChar'))
|
|
74
74
|
{
|
|
75
|
-
tmpParameterEntry = _Fable.MeadowMSSQLProvider.MSSQL[tmpParameterType](
|
|
75
|
+
tmpParameterEntry = _Fable.MeadowMSSQLProvider.MSSQL[tmpParameterType](255);
|
|
76
76
|
}
|
|
77
77
|
else
|
|
78
78
|
{
|
|
@@ -98,7 +98,12 @@ var MeadowProvider = function ()
|
|
|
98
98
|
|
|
99
99
|
let tmpPreparedStatement = getPreparedStatementFromQuery(pQuery);
|
|
100
100
|
|
|
101
|
-
let tmpQueryBody = `${pQuery.query.body} \nSELECT
|
|
101
|
+
let tmpQueryBody = `${pQuery.query.body} \nSELECT SCOPE_IDENTITY() AS value;`
|
|
102
|
+
|
|
103
|
+
if (pQuery.AllowIdentityInsert)
|
|
104
|
+
{
|
|
105
|
+
tmpQueryBody = `SET IDENTITY_INSERT ${pQuery.parameters.scope} ON; \n${tmpQueryBody} \nSET IDENTITY_INSERT ${pQuery.parameters.scope} OFF;`
|
|
106
|
+
}
|
|
102
107
|
|
|
103
108
|
tmpPreparedStatement.prepare(tmpQueryBody,
|
|
104
109
|
(pPrepareError) =>
|