Skip to content

Commit

Permalink
Merge pull request #35 from appsfortableau/hotfix/enable_statement_fo…
Browse files Browse the repository at this point in the history
…r_native

Enabled setting statement for native driver to fix numeric out of bou…
  • Loading branch information
nvzsolutions authored Aug 7, 2024
2 parents bb0c455 + cae1e7f commit d59c7d6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Flavours/Snowflake/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ public function connect(array $config)

$connection = parent::connect($config);

if ($usingSnowflakeDriver === false) {
// custom Statement class to resolve Streaming value and parameters.
if (PHP_VERSION_ID > 80000) {
$connection->setAttribute(PDO::ATTR_STATEMENT_CLASS, [\LaravelPdoOdbc\Flavours\Snowflake\PDO\Statement80::class, [$connection]]);
} else {
$connection->setAttribute(PDO::ATTR_STATEMENT_CLASS, [\LaravelPdoOdbc\Flavours\Snowflake\PDO\Statement74::class, [$connection]]);
}
// custom Statement class to resolve Streaming value and parameters.
if (PHP_VERSION_ID > 80000) {
$connection->setAttribute(PDO::ATTR_STATEMENT_CLASS, [\LaravelPdoOdbc\Flavours\Snowflake\PDO\Statement80::class, [$connection]]);
} else {
$connection->setAttribute(PDO::ATTR_STATEMENT_CLASS, [\LaravelPdoOdbc\Flavours\Snowflake\PDO\Statement74::class, [$connection]]);
}

return $connection;
Expand Down

0 comments on commit d59c7d6

Please sign in to comment.