prorm API Reference
    Preparing search index...

    Function sqlReverse

    • Reverse a string.

      • MySQL, MariaDB, MSSQL, Postgres (9.1+), CockroachDB, Snowflake: native REVERSE(expr).
      • ClickHouse: reverse() reverses BYTES, not characters, which breaks multi-byte text; reverseUTF8(expr) is used instead for correctness.
      • Oracle: no built-in REVERSE function for strings; there is no safe single-expression workaround (would require a hierarchical CONNECT BY LEVEL query), so this throws.
      • DB2: no built-in REVERSE scalar function in Db2 for LUW; throws for the same reason as Oracle.
      • Redshift: not present in Redshift's documented string-function list (Redshift's SQL dialect is derived from an old Postgres release that predates Postgres's REVERSE); throws rather than risk incorrect SQL.
      • SQLite: no built-in REVERSE function; throws.

      Parameters

      Returns LiteralExpression & { $literal: string }