Class Sql


  • public final class Sql
    extends java.lang.Object
    Helper utilities for SQL formatting.
    • Constructor Summary

      Constructors 
      Constructor Description
      Sql()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Name escapeName​(java.lang.String name)
      Escapes a SQL name.
      static java.lang.String escapeStringLiteral​(java.lang.String literal)
      Escapes a string literal for use in a SQL query.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sql

        public Sql()
    • Method Detail

      • escapeStringLiteral

        public static java.lang.String escapeStringLiteral​(java.lang.String literal)
        Escapes a string literal for use in a SQL query.
        Parameters:
        literal - An unescaped string.
        Returns:
        The escaped string.
      • escapeName

        public static Name escapeName​(java.lang.String name)
        Escapes a SQL name.
        Parameters:
        name - An unescaped name.
        Returns:
        The escaped name.