snowflakedb / pdo_snowflake

PHP PDO driver for snowflake
Apache License 2.0
62 stars 29 forks source link

SNOW-1214750: Clarify connection documentation #372

Closed nbennett25 closed 7 months ago

nbennett25 commented 7 months ago

What is the current behavior?

Documentation shows bare minimum instructions on how to connect:

$dbh = new \PDO("snowflake:account=$account;", $user, $password);
$sth = $dbh->query("select 1234");

This works as expected, but is not a typical use case.

What is the desired behavior?

Add details to documentation to specify other attributes, like warehouse and schema:

$dbh = new \PDO("snowflake:account=$account;warehouse=[WAREHOUSE_NAME];database=[DATABASE_NAME];schema=[SCHEMA_NAME]", $user, $password);
$sth = $dbh->query("select * from [MY_TABLE]");

How would this improve pdo_snowflake?

Save guess work on connection details

sfc-gh-dszmolka commented 7 months ago

hi and thank you for this suggestion! raised https://github.com/snowflakedb/pdo_snowflake/pull/373 to add the suggested bits into the connection example

sfc-gh-dszmolka commented 7 months ago

PR merged, docs updated. Again thank you for the suggestion!