-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update connection option docs to latest
based on documentation from the Snowflake web site
- Loading branch information
Showing
1 changed file
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |