dibi icon indicating copy to clipboard operation
dibi copied to clipboard

FirebirdDriver::escapeLike Dibi\NotImplementedException

Open jan-oliva opened this issue 7 years ago • 8 comments
trafficstars

Hello I have problem with firebird driver. Firebird driver has not implemented escapeLike method. Is possible to implement this method ?

Thanks

jan-oliva avatar Jun 07 '18 20:06 jan-oliva

Can you try to do it and send a pull request?

dg avatar Jun 07 '18 22:06 dg

Pull request created https://github.com/dg/dibi/pull/300

jan-oliva avatar Jul 14 '18 09:07 jan-oliva

Thanks

dg avatar Jul 14 '18 14:07 dg

Is possible propagate changes into tag v3.2.1 (v3.2.2) ? Thanks

jan-oliva avatar Jul 16 '18 07:07 jan-oliva

Are you sure that this solution is correct? According to http://www.janus-software.com/fbmanual/manual.php?book=psql&topic=82 If the escape clause is ommitted, then there is no default escape character..

dg avatar Jul 16 '18 08:07 dg

Do you mean last_name LIKE '%A\_B%' ESCAPE '\'

New code return ($pos <= 0 ? "'%" : "'") . $value . ($pos >= 0 ? "%'" : "'") .' ESCAPE '. "'\'";

returns string like LIKE '%Bašt%' ESCAPE ''

I will commit new code for pull request

jan-oliva avatar Aug 16 '18 12:08 jan-oliva

dle http://www.janus-software.com/fbmanual/manual.php?book=psql&topic=82 jsem to chápal, jako že když tam právě uvedu ESCAPE '', že tím právě definuji escape znak.

jan-oliva avatar Aug 22 '18 10:08 jan-oliva

Asi jo, ale musí se to otestovat. Zkusil jsem přidat test. https://github.com/dg/dibi/commit/0fb63f3e6b1370f5b1c5bf5b4253728d658a30ea

dg avatar Aug 22 '18 10:08 dg