Skip to content

Commit

Permalink
java doc update part 6
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-jf committed Oct 23, 2024
1 parent a91a006 commit 3e0678b
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public SnowflakeBaseResultSet(SnowflakeResultSetSerializableV1 resultSetSerializ
/**
* This should never be used. Simply needed this for SFAsynchronousResult subclass
*
* @throws SQLException
* @throws SQLException if an error occurs
*/
protected SnowflakeBaseResultSet() throws SQLException {
this.resultSetType = 0;
Expand Down Expand Up @@ -139,6 +139,14 @@ protected void raiseSQLExceptionIfResultSetIsClosed() throws SQLException {
@Override
public abstract byte[] getBytes(int columnIndex) throws SQLException;

/**
* Get Date value
*
* @param columnIndex column index
* @param tz timezone
* @return Date value at column index
* @throws SQLException if data at column index is incompatible with Date type
*/
public abstract Date getDate(int columnIndex, TimeZone tz) throws SQLException;

private boolean getGetDateUseNullTimezone() {
Expand Down Expand Up @@ -168,6 +176,14 @@ public Timestamp getTimestamp(int columnIndex) throws SQLException {
return getTimestamp(columnIndex, (TimeZone) null);
}

/**
* Get timestamp value
*
* @param columnIndex column index
* @param tz timezone
* @return timestamp value at column index
* @throws SQLException if data at column index is incompatible with timestamp
*/
public abstract Timestamp getTimestamp(int columnIndex, TimeZone tz) throws SQLException;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ public void uncaughtException(Thread t, Throwable e) {
*
* @param resultSetSerializable the result set serializable object which includes required
* metadata to start chunk downloader
* @throws SnowflakeSQLException if an error is encountered
*/
public SnowflakeChunkDownloader(SnowflakeResultSetSerializableV1 resultSetSerializable)
throws SnowflakeSQLException {
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/net/snowflake/client/jdbc/SnowflakeColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,26 @@
* (Optional) The name for a column in database,
*
* <p>The default value is empty string. Provided name can override SqlData field name
*
* @return string
*/
String name() default "";

/**
* (Optional) The snowflake type for a column
*
* <p>The default value is empty string Provided type can override default type
*
* @return string
*/
String type() default "";

/**
* (Optional) The snowflake nullable flag for a column
*
* <p>The default value is true Provided value can override default nullable value
*
* @return boolean
*/
boolean nullable() default true;

Expand All @@ -38,6 +44,8 @@
* <p>Applies only to columns of exact varchar and binary type.
*
* <p>The default value {@code -1} indicates that a provider-determined length should be inferred.
*
* @return int
*/
int length() default -1;
/**
Expand All @@ -48,6 +56,8 @@
*
* <p>The default value {@code -1} indicates that a provider-determined byteLength should be
* inferred.
*
* @return int
*/
int byteLength() default -1;

Expand All @@ -59,6 +69,8 @@
*
* <p>The default value {@code -1} indicates that a provider-determined precision should be
* inferred.
*
* @return int
*/
int precision() default -1;

Expand All @@ -69,6 +81,8 @@
* <p>Applies only to columns of exact numeric type.
*
* <p>The default value {@code 0} indicates that a provider-determined scale should be inferred.
*
* @return int
*/
int scale() default -1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ public SnowflakeColumnMetadata(
* @deprecated Use {@link SnowflakeColumnMetadata#SnowflakeColumnMetadata(String, int, boolean,
* int, int, int, String, boolean, SnowflakeType, List, String, String, String, boolean, int)}
* instead
* @param name name
* @param type type
* @param nullable is nullable
* @param length length
* @param precision precision
* @param scale scale
* @param typeName type name
* @param fixed is fixed
* @param base SnowflakeType
* @param columnSrcDatabase column source database
* @param columnSrcSchema column source schema
* @param columnSrcTable column source table
* @param isAutoIncrement is auto-increment
*/
@Deprecated
public SnowflakeColumnMetadata(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
public interface SnowflakeResultSet {
/**
* @return the Snowflake query ID of the query which generated this result set
* @throws SQLException if an error is encountered
*/
String getQueryID() throws SQLException;

Expand All @@ -23,7 +24,7 @@ public interface SnowflakeResultSet {
* query statuses. QueryStatus = SUCCESS means results can be retrieved.
*
* @return QueryStatus enum showing status of query
* @throws SQLException
* @throws SQLException if an error is encountered
*/
QueryStatus getStatus() throws SQLException;

Expand All @@ -33,7 +34,7 @@ public interface SnowflakeResultSet {
* returned.
*
* @return String value of query's error message
* @throws SQLException
* @throws SQLException if an error is encountered
*/
String getQueryErrorMessage() throws SQLException;

Expand All @@ -45,7 +46,7 @@ public interface SnowflakeResultSet {
* <p><code>status.isSuccess()</code> means that results can be retrieved.
*
* @return an instance containing query metadata
* @throws SQLException
* @throws SQLException if an error is encountered
*/
QueryStatusV2 getStatusV2() throws SQLException;

Expand Down

0 comments on commit 3e0678b

Please sign in to comment.