copyWith method

SqlStatement copyWith({
  1. SqlOperationType? operationType,
  2. String? tableName,
  3. String? selectColumns,
  4. String? fromAlias,
  5. List<String>? insertColumns,
  6. String? insertValuesPlaceholders,
  7. List<Object?>? insertArguments,
  8. List<String>? updateSetClauses,
  9. List<Object?>? updateArguments,
  10. String? upsertConflictTarget,
  11. String? upsertUpdateSetClauses,
  12. List<String>? whereClauses,
  13. List<Object?>? whereArguments,
  14. String? orderBy,
  15. int? limit,
  16. int? offset,
})

Creates a copy of this statement with the given fields replaced.

Implementation

SqlStatement copyWith({
  SqlOperationType? operationType,
  String? tableName,
  String? selectColumns,
  String? fromAlias,
  List<String>? insertColumns,
  String? insertValuesPlaceholders,
  List<Object?>? insertArguments,
  List<String>? updateSetClauses,
  List<Object?>? updateArguments,
  String? upsertConflictTarget,
  String? upsertUpdateSetClauses,
  List<String>? whereClauses,
  List<Object?>? whereArguments,
  String? orderBy,
  int? limit,
  int? offset,
}) {
  return SqlStatement(
    operationType: operationType ?? this.operationType,
    tableName: tableName ?? this.tableName,
    selectColumns: selectColumns ?? this.selectColumns,
    fromAlias: fromAlias ?? this.fromAlias,
    insertColumns: insertColumns ?? this.insertColumns,
    insertValuesPlaceholders:
        insertValuesPlaceholders ?? this.insertValuesPlaceholders,
    insertArguments: insertArguments ?? this.insertArguments,
    updateSetClauses: updateSetClauses ?? this.updateSetClauses,
    updateArguments: updateArguments ?? this.updateArguments,
    upsertConflictTarget: upsertConflictTarget ?? this.upsertConflictTarget,
    upsertUpdateSetClauses:
        upsertUpdateSetClauses ?? this.upsertUpdateSetClauses,
    whereClauses: whereClauses ?? this.whereClauses,
    whereArguments: whereArguments ?? this.whereArguments,
    orderBy: orderBy ?? this.orderBy,
    limit: limit ?? this.limit,
    offset: offset ?? this.offset,
  );
}