datoms method

dynamic datoms(
  1. JsRef db,
  2. String index,
  3. Object? c1,
  4. Object? c2,
  5. Object? c3,
  6. Object? c4,
)

Index lookup. Returns a sequence of datoms (lazy iterator over actual Db index) which components (e, a, v) match passed arguments.

Implementation

datoms(
    JsRef db, String index, Object? c1, Object? c2, Object? c3, Object? c4) {
  final code = """
  vendor.ds.datoms(${db.toJsCode()}, '$index', ${jsonEncode(c1)}, ${jsonEncode(c2)}, ${jsonEncode(c3)}, ${jsonEncode(c4)});
  """;
  var res = context.evaluate(code) as List;
  return toEavt(res);
}