Closed vinodnarayankar closed 8 months ago
hi and apologies for leaving this issue unattended for so long; we're changing that.
Snowflake stores the object identifier in uppercase by default. If you created an identifier with "myobject"
then it will be indeed literally stored like that, in this case: lowercase myobject
instead of the default MYOBJECT
Not sure about the options available in Laravel, maybe you can try
true
(default: false
) to make it ignor the casing inside the doublequoteshope this help. marking this one as closed for now, as it doesn't seem to be an issue with the pdo_snowflake
driver
Please answer these questions before submitting your issue. In order to accurately debug the issue this information is required. Thanks!
What version of PDO/PHP driver are you using? php 8.0.8
What operating system and processor architecture are you using? WINDOWS 11
What version of C/C++ compiler are you using?
What did you do?
I am trying to connect snowflake with PHP and Laravel. Connection is successful. I am able to access the database. In few cases, Laravel is generating query in upper case. Would help me providing possible solution through which my queries generate in lower case. One of the generated query through laravel is as below. in my DB I have ROLES.ID is lower case.
SQLSTATE[42000]: Syntax error or access violation: 904 SQL compilation error: error line 1 at position 190 invalid identifier 'ROLES.ID' (SQL: select ROLES.*, MODEL_HAS_ROLES.MODEL_ID AS PIVOT_MODEL_ID, MODEL_HAS_ROLES.ROLE_ID AS PIVOT_ROLE_ID, MODEL_HAS_ROLES.MODEL_TYPE AS PIVOT_MODEL_TYPE from ROLES inner join MODEL_HAS_ROLES on ROLES.ID = MODEL_HAS_ROLES.ROLE_ID where MODEL_HAS_ROLES.MODEL_ID in (9) and MODEL_HAS_ROLES.MODEL_TYPE = App\Repository\User)
What did you expect to see?
What should have happened and what happened instead?
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
What is your Snowflake account identifier, if any? (Optional) Snowflake account identifier: xjrpozr-bkb40621