@salesforce/lds-runtime-mobile 1.119.2 → 1.119.4
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/dist/main.js +13 -6
- package/package.json +1 -1
- package/sfdc/main.js +13 -6
package/dist/main.js
CHANGED
|
@@ -6634,6 +6634,7 @@ function dateLiteral(literal, op, field, alias) {
|
|
|
6634
6634
|
type: PredicateType.single,
|
|
6635
6635
|
alias,
|
|
6636
6636
|
dataType: field.dataType,
|
|
6637
|
+
isCaseSensitive: false,
|
|
6637
6638
|
};
|
|
6638
6639
|
}
|
|
6639
6640
|
|
|
@@ -6663,6 +6664,7 @@ function dateTimePredicate(input, operator, field, alias) {
|
|
|
6663
6664
|
alias,
|
|
6664
6665
|
dataType: field.dataType,
|
|
6665
6666
|
type: PredicateType.single,
|
|
6667
|
+
isCaseSensitive: false,
|
|
6666
6668
|
};
|
|
6667
6669
|
if (value !== undefined) {
|
|
6668
6670
|
return predicate;
|
|
@@ -6840,6 +6842,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins) {
|
|
|
6840
6842
|
value: entityName,
|
|
6841
6843
|
dataType: 'String',
|
|
6842
6844
|
type: PredicateType.single,
|
|
6845
|
+
isCaseSensitive: true,
|
|
6843
6846
|
},
|
|
6844
6847
|
...filterToPredicates(where[field][entityName], entityName, childAlias, objectInfoMap, joins),
|
|
6845
6848
|
];
|
|
@@ -6952,8 +6955,12 @@ function createSinglePredicate(val, operator, field, alias) {
|
|
|
6952
6955
|
value,
|
|
6953
6956
|
dataType: field.dataType,
|
|
6954
6957
|
type: PredicateType.single,
|
|
6958
|
+
isCaseSensitive: isIDField(field),
|
|
6955
6959
|
};
|
|
6956
6960
|
}
|
|
6961
|
+
function isIDField(field) {
|
|
6962
|
+
return field.apiName === 'Id' || field.referenceToInfos.length > 0;
|
|
6963
|
+
}
|
|
6957
6964
|
function multiPicklistToSql(operator, value) {
|
|
6958
6965
|
// Individual multipicklist terms that delimited by semicolon are stored server-side
|
|
6959
6966
|
// as lexically sorted strings and treated like logical ANDs. We can approximate this
|
|
@@ -7062,7 +7069,7 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
7062
7069
|
return singleNotPredicateToIncludeNulls(predicate, defaultAlias);
|
|
7063
7070
|
}
|
|
7064
7071
|
// handles different type of filter predicate like 'date', 'picklist', 'time', 'percent'
|
|
7065
|
-
let { alias, leftPath, operator, value, dataType } = predicate;
|
|
7072
|
+
let { alias, leftPath, operator, value, dataType, isCaseSensitive } = predicate;
|
|
7066
7073
|
let binding = [];
|
|
7067
7074
|
let boundValue = extractPredicateValue(value, dataType);
|
|
7068
7075
|
// Handles boolean type field
|
|
@@ -7105,11 +7112,11 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
7105
7112
|
if (operator === 'IN' || operator === 'NOT IN') {
|
|
7106
7113
|
const { sql: questionSql, binding: valueBinding, includesNull, } = handleExtractedPredicateValue(boundValue, true);
|
|
7107
7114
|
// If an explicit collating sequence is required on an IN operator it should be applied to the left operand,
|
|
7108
|
-
// like this: "x COLLATE
|
|
7115
|
+
// like this: "x COLLATE NOCASE IN (y,z, ...)".
|
|
7109
7116
|
const nullCheck = `json_extract("${alias}".data, '${leftPath}') ${operator === 'IN' ? 'IS' : 'IS NOT'} ?`;
|
|
7110
7117
|
//if we only have a null in/nin then dont add the IN (y, z, ...)
|
|
7111
7118
|
if (valueBinding.length > 0) {
|
|
7112
|
-
sql = `json_extract("${alias}".data, '${leftPath}') COLLATE
|
|
7119
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${isCaseSensitive === true ? '' : `COLLATE NOCASE`} ${operator} ${questionSql} ${includesNull ? `OR ${nullCheck}` : ''}`;
|
|
7113
7120
|
}
|
|
7114
7121
|
else {
|
|
7115
7122
|
sql = `${includesNull ? nullCheck : ''}`;
|
|
@@ -7124,10 +7131,10 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
7124
7131
|
// SQLite is case sensitive by default, SOQL is case in-sensitive by default
|
|
7125
7132
|
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
7126
7133
|
if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
7127
|
-
sql = `'${MultiPickListValueSeparator}' || json_extract("${alias}".data, '${leftPath}') || '${MultiPickListValueSeparator}' ${operator} ${questionSql} COLLATE
|
|
7134
|
+
sql = `'${MultiPickListValueSeparator}' || json_extract("${alias}".data, '${leftPath}') || '${MultiPickListValueSeparator}' ${operator} ${questionSql} COLLATE NOCASE`;
|
|
7128
7135
|
}
|
|
7129
7136
|
else {
|
|
7130
|
-
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql} COLLATE
|
|
7137
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql} ${isCaseSensitive === true ? '' : `COLLATE NOCASE`}`;
|
|
7131
7138
|
}
|
|
7132
7139
|
binding.push(...valueBinding);
|
|
7133
7140
|
}
|
|
@@ -15622,4 +15629,4 @@ register({
|
|
|
15622
15629
|
});
|
|
15623
15630
|
|
|
15624
15631
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15625
|
-
// version: 1.119.
|
|
15632
|
+
// version: 1.119.4-078007fd4
|
package/package.json
CHANGED
package/sfdc/main.js
CHANGED
|
@@ -6634,6 +6634,7 @@ function dateLiteral(literal, op, field, alias) {
|
|
|
6634
6634
|
type: PredicateType.single,
|
|
6635
6635
|
alias,
|
|
6636
6636
|
dataType: field.dataType,
|
|
6637
|
+
isCaseSensitive: false,
|
|
6637
6638
|
};
|
|
6638
6639
|
}
|
|
6639
6640
|
|
|
@@ -6663,6 +6664,7 @@ function dateTimePredicate(input, operator, field, alias) {
|
|
|
6663
6664
|
alias,
|
|
6664
6665
|
dataType: field.dataType,
|
|
6665
6666
|
type: PredicateType.single,
|
|
6667
|
+
isCaseSensitive: false,
|
|
6666
6668
|
};
|
|
6667
6669
|
if (value !== undefined) {
|
|
6668
6670
|
return predicate;
|
|
@@ -6840,6 +6842,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins) {
|
|
|
6840
6842
|
value: entityName,
|
|
6841
6843
|
dataType: 'String',
|
|
6842
6844
|
type: PredicateType.single,
|
|
6845
|
+
isCaseSensitive: true,
|
|
6843
6846
|
},
|
|
6844
6847
|
...filterToPredicates(where[field][entityName], entityName, childAlias, objectInfoMap, joins),
|
|
6845
6848
|
];
|
|
@@ -6952,8 +6955,12 @@ function createSinglePredicate(val, operator, field, alias) {
|
|
|
6952
6955
|
value,
|
|
6953
6956
|
dataType: field.dataType,
|
|
6954
6957
|
type: PredicateType.single,
|
|
6958
|
+
isCaseSensitive: isIDField(field),
|
|
6955
6959
|
};
|
|
6956
6960
|
}
|
|
6961
|
+
function isIDField(field) {
|
|
6962
|
+
return field.apiName === 'Id' || field.referenceToInfos.length > 0;
|
|
6963
|
+
}
|
|
6957
6964
|
function multiPicklistToSql(operator, value) {
|
|
6958
6965
|
// Individual multipicklist terms that delimited by semicolon are stored server-side
|
|
6959
6966
|
// as lexically sorted strings and treated like logical ANDs. We can approximate this
|
|
@@ -7062,7 +7069,7 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
7062
7069
|
return singleNotPredicateToIncludeNulls(predicate, defaultAlias);
|
|
7063
7070
|
}
|
|
7064
7071
|
// handles different type of filter predicate like 'date', 'picklist', 'time', 'percent'
|
|
7065
|
-
let { alias, leftPath, operator, value, dataType } = predicate;
|
|
7072
|
+
let { alias, leftPath, operator, value, dataType, isCaseSensitive } = predicate;
|
|
7066
7073
|
let binding = [];
|
|
7067
7074
|
let boundValue = extractPredicateValue(value, dataType);
|
|
7068
7075
|
// Handles boolean type field
|
|
@@ -7105,11 +7112,11 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
7105
7112
|
if (operator === 'IN' || operator === 'NOT IN') {
|
|
7106
7113
|
const { sql: questionSql, binding: valueBinding, includesNull, } = handleExtractedPredicateValue(boundValue, true);
|
|
7107
7114
|
// If an explicit collating sequence is required on an IN operator it should be applied to the left operand,
|
|
7108
|
-
// like this: "x COLLATE
|
|
7115
|
+
// like this: "x COLLATE NOCASE IN (y,z, ...)".
|
|
7109
7116
|
const nullCheck = `json_extract("${alias}".data, '${leftPath}') ${operator === 'IN' ? 'IS' : 'IS NOT'} ?`;
|
|
7110
7117
|
//if we only have a null in/nin then dont add the IN (y, z, ...)
|
|
7111
7118
|
if (valueBinding.length > 0) {
|
|
7112
|
-
sql = `json_extract("${alias}".data, '${leftPath}') COLLATE
|
|
7119
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${isCaseSensitive === true ? '' : `COLLATE NOCASE`} ${operator} ${questionSql} ${includesNull ? `OR ${nullCheck}` : ''}`;
|
|
7113
7120
|
}
|
|
7114
7121
|
else {
|
|
7115
7122
|
sql = `${includesNull ? nullCheck : ''}`;
|
|
@@ -7124,10 +7131,10 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
7124
7131
|
// SQLite is case sensitive by default, SOQL is case in-sensitive by default
|
|
7125
7132
|
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
7126
7133
|
if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
7127
|
-
sql = `'${MultiPickListValueSeparator}' || json_extract("${alias}".data, '${leftPath}') || '${MultiPickListValueSeparator}' ${operator} ${questionSql} COLLATE
|
|
7134
|
+
sql = `'${MultiPickListValueSeparator}' || json_extract("${alias}".data, '${leftPath}') || '${MultiPickListValueSeparator}' ${operator} ${questionSql} COLLATE NOCASE`;
|
|
7128
7135
|
}
|
|
7129
7136
|
else {
|
|
7130
|
-
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql} COLLATE
|
|
7137
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql} ${isCaseSensitive === true ? '' : `COLLATE NOCASE`}`;
|
|
7131
7138
|
}
|
|
7132
7139
|
binding.push(...valueBinding);
|
|
7133
7140
|
}
|
|
@@ -15622,4 +15629,4 @@ register({
|
|
|
15622
15629
|
});
|
|
15623
15630
|
|
|
15624
15631
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15625
|
-
// version: 1.119.
|
|
15632
|
+
// version: 1.119.4-078007fd4
|