concat method

StringField concat(
  1. dynamic other
)

Concat this string db value with other, other may be StringField or String

Implementation

StringField concat(dynamic other) {
  assert(other is String || other is StringField);

  var result = StringField();
  result.queryBuilder = () =>
      '(${buildQuery()} || ${other is StringField ? other.buildQuery() : '?'})';
  result.parametersBuilder = () => getParameters()
    ..addAll(
        [if (other is StringField) ...(other.getParameters()) else other]);

  return result;
}