[PHP-DEV][RFC] Enable authorizer-feature in PDO_SQLITE

2006-12-11 Thread Mario Wolff
Any suggestions or meanings on it? Thanks, Mario Short test script: sqliteSetAuthorizer('auth'); $db->exec( "CREATE TABLE strings( a)"); $insert = $db->prepare( 'INSERT INTO strings VALUES ( ?)'); foreach ( $data as $str) { $insert->execute( array( $str)); } $insert = null; if( $delete = $

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-17 Thread Mario Wolff
2006/11/16, Wez Furlong <[EMAIL PROTECTED]>: I think it would be better to pass in the pdo_dbh_t as the autharg to the C level callback and then use that to determine if any of the expensive work needs to be done in the callback. Saves the sqlite_set_authorizer recall in SetAuthorizer, Looks si

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
Short test script: sqliteSetAuthorizer('auth'); $db->exec( "CREATE TABLE strings( a)"); $insert = $db->prepare( 'INSERT INTO strings VALUES ( ?)'); foreach ( $data as $str) { $insert->execute( array( $str)); } $insert = null; echo "unregister authorizer\n"; $db->sqliteSetAuthorizer(); fun

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
2006/11/16, Mario Wolff <[EMAIL PROTECTED]>: 2006/11/16, Wez Furlong <[EMAIL PROTECTED]>: > I suggest that you adjust your patch to cache the function callback > information in the pdo_dbh_t to reduce some of that overhead, and run > some benchmarks for a simple authorizer

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
2006/11/16, Wez Furlong <[EMAIL PROTECTED]>: I suggest that you adjust your patch to cache the function callback information in the pdo_dbh_t to reduce some of that overhead, and run some benchmarks for a simple authorizer function in PHP that always returns true vs the same script with no author

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
--Wez. Regards, Mario On 11/16/06, Mario Wolff <[EMAIL PROTECTED]> wrote: > Hello list, > i've extended sqlite_driver to get access to the authorizer-feature of > sqlite. This is my first contact with the Zend-API and my last c skill > is more than a bit outdated. > C

[PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
Hello list, i've extended sqlite_driver to get access to the authorizer-feature of sqlite. This is my first contact with the Zend-API and my last c skill is more than a bit outdated. Could someone review/cleanup my code to get it merged to the distribution? Hint and comment welcome! Thanks,