Class Lexicals.Identifier.Operator

All Implemented Interfaces:
Serializable
Enclosing class:
Lexicals.Identifier

public static class Lexicals.Identifier.Operator
extends Lexicals.Identifier.Unqualified<Lexicals.Identifier.Operator>
Class representing an Identifier that names a PostgreSQL operator.
See Also:
Serialized Form
  • Method Details

    • from

      public static Lexicals.Identifier.Operator from​(String name)
      Create an Identifier.Operator from a name string.

      Equivalent to from(s, null).

    • from

      public static Lexicals.Identifier.Operator from​(String name, Messager msgr)
      Create an Identifier.Operator from a name string.

      There are not different ways to represent an operator in Java source and in the PostgreSQL catalogs, so there do not need to be fromCatalog and fromJava flavors of this method.

      Parameters:
      name - The operator name.
      msgr - a Messager for reporting diagnostics at compile time, or null if not in a compilation context.
    • withQualifier

      Description copied from class: Lexicals.Identifier.Unqualified
      Form an Identifier.Qualified with this as the local part.
      Specified by:
      withQualifier in class Lexicals.Identifier.Unqualified<Lexicals.Identifier.Operator>
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object other, Messager msgr)
      Description copied from class: Lexicals.Identifier
      For use in an annotation processor, a version of equals that can take a Messager and use it to emit warnings. It will emit a warning whenever it compares two Identifiers that are equal by one or the other of PostgreSQL's or ISO SQL's rules but not both.
      Specified by:
      equals in class Lexicals.Identifier
      Parameters:
      other - Object to compare to
      msgr - a Messager to use for warnings; if null, no warnings will be generated.
      Returns:
      true if two quoted Identifiers match exactly, or two non-quoted ones match in either the PostgreSQL or ISO SQL folded form, or a quoted one exactly matches either folded form of a non-quoted one.
    • deparse

      public String deparse​(Charset cs)
      Description copied from class: Lexicals.Identifier
      This Identifier represented as it would be in SQL source.

      The passed Charset indicates the character encoding in which the deparsed result will be stored; the method should verify that the characters can be encoded there, or use the Unicode delimited identifier form and escape the ones that cannot.

      Specified by:
      deparse in class Lexicals.Identifier
      Returns:
      The identifier, quoted, unless it is folding.
    • deparse

      public String deparse​(Lexicals.Identifier.Simple qualifier, Charset cs)
      Description copied from class: Lexicals.Identifier.Unqualified
      Produce the deparsed form of a qualified identifier with the given qualifier and this as the local part.
      Specified by:
      deparse in class Lexicals.Identifier.Unqualified<Lexicals.Identifier.Operator>