validateIntegrity method
- Insertable<
WindowRectangleRow> 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<WindowRectangleRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('id')) {
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
}
if (data.containsKey('width')) {
context.handle(
_widthMeta, width.isAcceptableOrUnknown(data['width']!, _widthMeta));
}
if (data.containsKey('height')) {
context.handle(_heightMeta,
height.isAcceptableOrUnknown(data['height']!, _heightMeta));
}
if (data.containsKey('dx')) {
context.handle(_dxMeta, dx.isAcceptableOrUnknown(data['dx']!, _dxMeta));
}
if (data.containsKey('dy')) {
context.handle(_dyMeta, dy.isAcceptableOrUnknown(data['dy']!, _dyMeta));
}
return context;
}