validateIntegrity method
- Insertable<
CallCredentialsRow> instance, { - bool isInserting = false,
override
Validates that the given entity can be inserted into this table, meaning that it respects all constraints (nullability, text length, etc.).
Implementation
@override
VerificationContext validateIntegrity(Insertable<CallCredentialsRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('call_id')) {
context.handle(_callIdMeta,
callId.isAcceptableOrUnknown(data['call_id']!, _callIdMeta));
} else if (isInserting) {
context.missing(_callIdMeta);
}
if (data.containsKey('credentials')) {
context.handle(
_credentialsMeta,
credentials.isAcceptableOrUnknown(
data['credentials']!, _credentialsMeta));
} else if (isInserting) {
context.missing(_credentialsMeta);
}
return context;
}