load method

  1. @override
Future<DVWorkflowDocument?> load(
  1. String name
)
override

Implementation

@override
Future<DVWorkflowDocument?> load(String name) async {
  await _initialize();
  final rows = await const DVDatabase().records.find(
    table,
    where: DVFilter.equals('name', name),
    fields: const <String>['document'],
  );
  if (rows.isEmpty) return null;
  return DVWorkflowDocument.fromJson(
    (jsonDecode(rows.first['document']! as String) as Map)
        .cast<String, Object?>(),
  );
}