Class SchemaNameUtils

java.lang.Object
io.micronaut.data.runtime.multitenancy.internal.SchemaNameUtils

@Internal public final class SchemaNameUtils extends Object
Utilities for safely rendering schema names in schema-switching SQL.
  • Method Details

    • render

      public static String render(Dialect dialect, String name)
      Renders a schema name as a dialect-compatible SQL identifier. Simple identifiers are left unquoted to preserve the case-folding behavior of existing applications. All other names are quoted and their delimiters escaped. The input is always treated as a logical name; SQL quoting supplied by a caller is not interpreted.
      Parameters:
      dialect - The SQL dialect
      name - The logical schema name
      Returns:
      The safely rendered identifier
      Throws:
      IllegalArgumentException - If the name is null, empty, or contains a NUL character