Class ColumnIdentifier
- java.lang.Object
-
- com.snowflake.snowpark_java.types.ColumnIdentifier
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ColumnIdentifier extends java.lang.Object implements java.lang.CloneableRepresents Column Identifier- Since:
- 0.9.0
-
-
Constructor Summary
Constructors Constructor Description ColumnIdentifier(java.lang.String name)Creates a ColumnIdentifier object for the giving column name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnIdentifierclone()Creates a clone of thisColumnIdentifierobject.booleanequals(java.lang.Object other)Compares this ColumnIdentifier with the giving oneinthashCode()Calculates the hash code of this ColumnIdentifier.java.lang.Stringname()Returns the name of column.java.lang.StringquotedName()Returns the quoted name of this column Name Format: 1.java.lang.StringtoString()Generates a String value to represent this Column Identifier.
-
-
-
Constructor Detail
-
ColumnIdentifier
public ColumnIdentifier(java.lang.String name)
Creates a ColumnIdentifier object for the giving column name. Identifier Requirement can be found from https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html- Parameters:
name- The column name- Since:
- 0.9.0
-
-
Method Detail
-
name
public java.lang.String name()
Returns the name of column. Name format: 1. if the name quoted. a. starts with _A-Z and follows by _A-Z0-9$: remove quotes b. starts with $ and follows by digits: remove quotes c. otherwise, do nothing 2. if not quoted. a. starts with _a-zA-Z and follows by _a-zA-Z0-9$, upper case all letters. b. starts with $ and follows by digits, do nothing c. otherwise, quote nameMore details can be found from https://docs.snowflake.com/en/sql-reference/identifiers-syntax.html
- Returns:
- A String value representing the name
- Since:
- 0.9.0
-
quotedName
public java.lang.String quotedName()
Returns the quoted name of this column Name Format: 1. if quoted, do nothing 2. if not quoted. a. starts with _a-zA-Z and follows by _a-zA-Z0-9$, upper case all letters and then quote b. otherwise, quote nameIt is same as [[name]], but quotes always added. It is always safe to do String comparisons between quoted column names
- Returns:
- A String value representing the quoted name
- Since:
- 0.9.0
-
equals
public boolean equals(java.lang.Object other)
Compares this ColumnIdentifier with the giving one- Overrides:
equalsin classjava.lang.Object- Returns:
- true if these two are equivalent, otherwise, returns false.
- Since:
- 0.9.0
-
hashCode
public int hashCode()
Calculates the hash code of this ColumnIdentifier.- Overrides:
hashCodein classjava.lang.Object- Returns:
- An int number representing the hash code value
- Since:
- 0.9.0
-
toString
public java.lang.String toString()
Generates a String value to represent this Column Identifier.- Overrides:
toStringin classjava.lang.Object- Returns:
- A String value
- Since:
- 0.9.0
-
clone
public ColumnIdentifier clone()
Creates a clone of thisColumnIdentifierobject.- Overrides:
clonein classjava.lang.Object- Returns:
- A new
ColumnIdentifierobject - Since:
- 1.2.0
-
-