Skip to content

Commit

Permalink
docs: update connection option docs to latest
Browse files Browse the repository at this point in the history
based on documentation from the Snowflake web site
  • Loading branch information
natesilva committed Mar 8, 2021
1 parent 742177d commit 66c4c29
Showing 1 changed file with 35 additions and 22 deletions.
57 changes: 35 additions & 22 deletions src/types/ConnectionOptions.ts
Original file line number Diff line number Diff line change
@@ -1,51 +1,64 @@
export interface ConnectionOptions {
/**
* Name of your Snowflake account as it appears in the URL for accessing the
* web interface. For example, in https://abc123.snowflakecomputing.com,
* abc123 is the account name.
* The full name of your account (provided by Snowflake). Note that your full account
* name might include ***additional*** segments that identify the region and cloud
* platform where your account is hosted.
*
* Please see the following Snowflake document for more information:
* https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html#required-connection-options
*/
account: string;
/** Snowflake user login name to connect with. */
username: string;
/** Password for the user. */
password: string;
/**
* Region for the user. Currently, only required for users connecting to the
* following regions:
* US East: us-east-1
* EU (Frankfurt): eu-central-1
* The ID for the region where your account is located.
*
* @deprecated This parameter is no longer used because the region information, if
* required, is included as part of the full account name. It is documented here only
* for backward compatibility.
*/
region?: string;
/** The default database to use for the session after connecting. */
database?: string;
/** The default schema to use for the session after connecting. */
schema?: string;
/**
* The default virtual warehouse to use for the session after connecting. Used
* for performing queries, loading data, etc.
* The default virtual warehouse to use for the session after connecting. Used for
* performing queries, loading data, etc.
*/
warehouse?: string;
/** The default security role to use for the session after connecting. */
role?: string;
/**
* By default, client connections typically time out approximately 3-4 hours
* after the most recent query was executed. If the parameter clientSessionKeepAlive is set to true,
* the client’s connection to the server will be kept alive indefinitely, even if no queries are executed.
* The default setting of this parameter is false. If you set this parameter to true, make sure that your
* program explicitly disconnects from the server when your program has finished.
* Do not exit without disconnecting.
* By default, client connections typically time out approximately 3-4 hours after the
* most recent query was executed.
*
* If the parameter clientSessionKeepAlive is set to true, the client’s connection to
* the server will be kept alive indefinitely, even if no queries are executed.
*
* The default setting of this parameter is false.
*
* If you set this parameter to true, make sure that your program explicitly disconnects
* from the server when your program has finished. Do not exit without disconnecting.
*/
clientSessionKeepAlive?: boolean;
/**
* (Applies only when clientSessionKeepAlive is true)
* (Applies only when `clientSessionKeepAlive` is true)
*
* This parameter sets the frequency (interval in seconds) between heartbeat messages.
*
* You can loosely think of a connection heartbeat message as substituting for a query
* and restarting the timeout countdown for the connection. In other words, if the connection
* would time out after at least 4 hours of inactivity, the heartbeat resets the timer so that
* the timeout will not occur until at least 4 hours after the most recent heartbeat (or query).
* The default value is 3600 seconds (one hour). The valid range of values is 900 - 3600. Because
* timeouts usually occur after at least 4 hours, a heartbeat every 1 hour is normally sufficient
* to keep the connection alive. Heartbeat intervals of less than 3600 seconds are rarely necessary or useful.
* and restarting the timeout countdown for the connection. In other words, if the
* connection would time out after at least 4 hours of inactivity, the heartbeat resets
* the timer so that the timeout will not occur until at least 4 hours after the most
* recent heartbeat (or query).
*
* The default value is 3600 seconds (one hour). The valid range of values is 900 -
* 3600. Because timeouts usually occur after at least 4 hours, a heartbeat every 1 hour
* is normally sufficient to keep the connection alive. Heartbeat intervals of less than
* 3600 seconds are rarely necessary or useful.
*/
clientSessionKeepAliveHeartbeatFrequency?: number;
}

0 comments on commit 66c4c29

Please sign in to comment.