resetConn method

dynamic resetConn(
  1. JsRef conn,
  2. JsRef db, {
  3. dynamic txMeta,
})

Forces underlying conn value to become db. Will generate a TxReport that will remove everything from old value and insert everything from the new one."

Implementation

resetConn(JsRef conn, JsRef db, {txMeta}) {
  final code = """
  vendor.ds.reset_conn(${conn.toJsCode()}, ${db.toJsCode()}, ${jsonEncode(txMeta)});
  """;
  return context.evaluate(code);
}