encodeKeyConditionOperator method
FutureOr<EncodingContext>
encodeKeyConditionOperator(
- KeyCondition c,
- EncodingContext context,
- String operator, {
- bool valueAsList = false,
Implementation
FutureOr<EncodingContext> encodeKeyConditionOperator(
KeyCondition c,
EncodingContext context,
String operator, {
bool valueAsList = false,
}) {
// Only an `IN` list of a relationship ignores its `null`s:
var retRelationship = valueAsList ? _isRelationshipKey(c, context) : false;
return retRelationship.resolveMapped((relationship) {
var retKeySQL = keyToSQL(c, context);
return retKeySQL.resolveMapped((keySQL) {
var keyType = keySQL.key;
var tableKey = keySQL.value;
return encodeConditionValuesWithOperator(
context,
keyType,
null,
tableKey,
operator,
valueAsList && _isNullParameterSet(c, context) ? const [] : c.value,
valueAsList,
negated: c.isNegated,
nullable: !_isMainTableIDKey(c, context),
condition: c,
nullsAsAbsent: relationship,
);
});
});
}