trim method

Sql trim()

Removes the enclosing parentheses, if present, and returns the result.

Implementation

Sql trim() => Sql(
  str.startsWith("(") && str.endsWith(")")
      ? str.substring(1, str.length - 1)
      : str,
);