Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDO::PARAM_STR - This is not supported, please use prepared statements. #87

Open
olavski opened this issue May 25, 2018 · 2 comments
Open
Labels

Comments

@olavski
Copy link

olavski commented May 25, 2018

I'm using Crate with the Laravel Eloquent ORM and I'm having problems PDO::PARAM_STR.
For now I replaced

throw new Exception\UnsupportedException('This is not supported, please use prepared statements.');

with:

return str_replace( "'", "''", $string );

And that seemed to work for my current use case.

Is there a way to fully support PDO::PARAM_STR?

Cheers!

@seut
Copy link
Member

seut commented Mar 28, 2019

@olavski Sorry for our late response, this slipped through somehow.
Afaik you're talking about the PDO->quote() method, right?

Can you elaborate a bit more why you need this method to be implemented properly (why it should support PDO::PARAM_STR)?

@seut seut added the feature label Mar 28, 2019
@olavski
Copy link
Author

olavski commented Apr 5, 2019

Thanks for looking into this!

If I remember correctly this error came up using a 3rd party package (Laravel Debugbar) with Laravel (https://github.com/RatkoR/laravel-crate.io).

The package would mainly used with MySQL/Postgres and would not have been tested with CrateDB.
I'm using a modified version of crate-pdo to get it working: https://github.com/web64/crate-pdo/blob/master/src/Crate/PDO/PDO.php#L447

Also see: RatkoR/laravel-crate.io#2

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants