doInsertRelationship method

  1. @override
FutureOr<bool> doInsertRelationship(
  1. TransactionOperation op,
  2. String entityName,
  3. String table,
  4. String field,
  5. dynamic id,
  6. String otherTableName,
  7. List otherIds, [
  8. PreFinishDBOperation<bool, bool>? preFinish,
])
override

Implementation

@override
FutureOr<bool> doInsertRelationship(
    TransactionOperation op,
    String entityName,
    String table,
    String field,
    dynamic id,
    String otherTableName,
    List otherIds,
    [PreFinishDBOperation<bool, bool>? preFinish]) {
  return generateInsertRelationshipSQLs(op.transaction, entityName, table,
          field, id, otherTableName, otherIds)
      .resolveMapped((sqls) {
    return insertRelationshipSQLs(
            op, entityName, table, sqls, id, otherTableName, otherIds)
        .resolveMapped((r) => _finishSQLOperation(sqls, op, r, preFinish));
  });
}