Module org.postgresql.pljava
Package org.postgresql.pljava.sqlgen
Class Lexicals.Identifier.Operator
- java.lang.Object
-
- org.postgresql.pljava.sqlgen.Lexicals.Identifier
-
- org.postgresql.pljava.sqlgen.Lexicals.Identifier.Unqualified<Lexicals.Identifier.Operator>
-
- org.postgresql.pljava.sqlgen.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.postgresql.pljava.sqlgen.Lexicals.Identifier
Lexicals.Identifier.Operator, Lexicals.Identifier.Pseudo, Lexicals.Identifier.Qualified<T extends Lexicals.Identifier.Unqualified<T>>, Lexicals.Identifier.Simple, Lexicals.Identifier.Unqualified<T extends Lexicals.Identifier.Unqualified<T>>
-
-
Method Summary
Modifier and Type Method Description String
deparse(Charset cs)
This Identifier represented as it would be in SQL source.String
deparse(Lexicals.Identifier.Simple qualifier, Charset cs)
Produce the deparsed form of a qualified identifier with the given qualifier and this as the local part.boolean
equals(Object other, Messager msgr)
For use in an annotation processor, a version ofequals
that can take aMessager
and use it to emit warnings.static Lexicals.Identifier.Operator
from(String name)
Create anIdentifier.Operator
from a name string.static Lexicals.Identifier.Operator
from(String name, Messager msgr)
Create anIdentifier.Operator
from a name string.int
hashCode()
Returns a hash code value for the object.Lexicals.Identifier.Qualified<Lexicals.Identifier.Operator>
withQualifier(Lexicals.Identifier.Simple qualifier)
Form anIdentifier.Qualified
with this as the local part.-
Methods inherited from class org.postgresql.pljava.sqlgen.Lexicals.Identifier
equals, toString
-
-
-
-
Method Detail
-
from
public static Lexicals.Identifier.Operator from(String name)
Create anIdentifier.Operator
from a name string.Equivalent to
from(s, null)
.
-
from
public static Lexicals.Identifier.Operator from(String name, Messager msgr)
Create anIdentifier.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
andfromJava
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
public Lexicals.Identifier.Qualified<Lexicals.Identifier.Operator> withQualifier(Lexicals.Identifier.Simple qualifier)
Description copied from class:Lexicals.Identifier.Unqualified
Form anIdentifier.Qualified
with this as the local part.- Specified by:
withQualifier
in classLexicals.Identifier.Unqualified<Lexicals.Identifier.Operator>
-
hashCode
public int hashCode()
Returns a hash code value for the object.
-
equals
public boolean equals(Object other, Messager msgr)
Description copied from class:Lexicals.Identifier
For use in an annotation processor, a version ofequals
that can take aMessager
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 classLexicals.Identifier
- Parameters:
other
- Object to compare tomsgr
- a Messager to use for warnings; ifnull
, 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 classLexicals.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 classLexicals.Identifier.Unqualified<Lexicals.Identifier.Operator>
-
-