-
Notifications
You must be signed in to change notification settings - Fork 342
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 integration is rough #322
Comments
Now that xhgui-collector is imported back to this project: can perhaps use doctrine or cakephp/database abstractions for database. altho these indicated by you could be just fixed to be compatible with sqlite/mysql/pgsql simple changes. |
could you please elaborate what that statement means? |
seems pgsql/sqlite accept some alternative solutions is to let it be configurable ref:
|
changed id column to match MongoId length: 24 characters: NOTE: this will break on 2038/2106 year (depending on cpu bits). likely fix is to increase column length to be 25 characters. but deal with the problem when it's due :) |
My ugly debug is : $ok = $pdo->exec(sprintf(self::TABLE_DDL, $table));
error_log("Create table : $ok"); Throwing an exception when |
I just inject my first xhprof trace to Mysql with the 322-pdo branch ! |
so your statement means table creation errors are not checked! |
Besides table name, So, omitting escaping is out of the question. Still need to abstract db layer |
also, pgsql fails with:
so, I think currently only sqlite was really supported? |
Ok, you are speaking about this part of Doctrine : https://github.com/doctrine/dbal/ not the ORM part. |
@athoune can you find compatible quoting for table names and column names that are valid for all common pdo modules:
i think no such exist, and can't omit quoting as GET is reserved keyword in mysql? |
The Doctrine's DBAL handles all the little differences between databases :
I don't know what is the simplest way to do, trusting Doctrine job for true universal DB handling, or tiny handcrafted code. |
@athoune can test this PR? |
I'm trying to use Mysql PDO connector (with a Mariadb 10.1), with XHGui 0.13.0 :
src/xhgui/vendor/perftools/xhgui-collector/src/Xhgui/Saver/Pdo.php
ERROR 1170 (42000): BLOB/TEXT column 'id' used in key specification without a key length
The text was updated successfully, but these errors were encountered: