Class SchemaNameUtils


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String render​(Dialect dialect, java.lang.String name)
      Renders a schema name as a dialect-compatible SQL identifier.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • render

        public static java.lang.String render​(Dialect dialect,
                                              java.lang.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:
        java.lang.IllegalArgumentException - If the name is null, empty, or contains a NUL character