? Success
Pull Request for # 6159

User tests: Successful: Unsuccessful:

avatar alikon
alikon
25 Feb 2015

Steps to reproduce the issue

Go to the Extension -> Module Manager in Backend and search for a term

Expected result

If some match are found the result module list is returned

Actual result

Got an ERROR SQL QUERY SYNTAX ERROR REGEXP

System information

PostgreSQL 9.3.5
Joomla 3.4.0

Additional comments

the REGEXP operator work only for Mysql

for Postgres we should use ~*

fix #6159

avatar alikon alikon - open - 25 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 25 Feb 2015
Labels Added: ?
avatar mbabker
mbabker - comment - 25 Feb 2015

It looks like this is going to fail as you added the method to the query classes yet you're calling it from the driver class.

Also, we need a method in the base driver/query class (whichever it is supposed to be in) otherwise it'll need to be wrapped in a method_exists() check as I don't see a method here for SQL Server.

avatar alikon alikon - change - 25 Feb 2015
The description was changed
avatar alikon
alikon - comment - 25 Feb 2015

@mbabker you are right my fault, hope better now

for the SQL server based on this http://www.sql-workbench.net/dbms_comparison.html we are in trouble

so i ask why we need a posix pattern matching in module/template/style search ?
for db's portability should be better the trivial LIKE

avatar mbabker
mbabker - comment - 25 Feb 2015

Can't say I have an answer for that one, but if it works the same with a LIKE then go for it.

avatar alikon alikon - change - 26 Feb 2015
Title
PostgreSQL - SQL error when search for module
PostgreSQL - SQL error when search for module
avatar alikon alikon - change - 26 Feb 2015
Title
PostgreSQL - SQL error when search for module
PostgreSQL - SQL error when search for module
avatar alikon alikon - change - 26 Feb 2015
Title
PostgreSQL - SQL error when search for module
PostgreSQL - SQL error when search for module
avatar alikon
alikon - comment - 26 Feb 2015

i've switched the 3 models from REGEXP to LIKE

despite i don't have a clue for MSSQL posix pattern matching i've added the "portability" method regexp for Mysql and Postgresql for future use

avatar zero-24 zero-24 - change - 26 Feb 2015
Title
PostgreSQL - SQL error when search for module
PostgreSQL - SQL error when search for module
avatar zero-24 zero-24 - change - 26 Feb 2015
Category Postgresql
avatar zero-24 zero-24 - change - 26 Feb 2015
Rel_Number 0 6159
Relation Type Pull Request for
avatar alikon
alikon - comment - 26 Feb 2015

It's for future purpose
The Regexp is an operator and usually it's used mainly in where condition or this is the way I think at
So I've putted that method in the query class

avatar alikon
alikon - comment - 26 Feb 2015

@gunjanpatel
as usual my typos in the comment i've writed

* Usage:
* $query->where('field ' . $db->regexp($search));

instead of

$query->where('field ' . $query->regexp($search));
avatar gunjanpatel
gunjanpatel - comment - 27 Feb 2015

Super @alikon Thanks.

avatar ketchupmonki ketchupmonki - test_item - 2 Mar 2015 - Tested successfully
avatar ketchupmonki
ketchupmonki - comment - 2 Mar 2015

Successfully tested in postgre.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6188.
avatar waader
waader - comment - 2 Mar 2015

@test works with postgresql, mssql, mysql! Thanks @alikon!

It also fixes search in template manager for postgresql and mssql.

avatar zero-24 zero-24 - change - 2 Mar 2015
Status Pending Ready to Commit
avatar waader waader - test_item - 2 Mar 2015 - Tested successfully
avatar zero-24
zero-24 - comment - 2 Mar 2015

Moving to RTC! Thanks for coding and testing!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6188.
avatar brianteeman brianteeman - change - 2 Mar 2015
Labels Added: ?
avatar Kubik-Rubik
Kubik-Rubik - comment - 2 Mar 2015

Great work @alikon!

avatar Kubik-Rubik Kubik-Rubik - close - 2 Mar 2015
avatar Kubik-Rubik Kubik-Rubik - reference | - 2 Mar 15
avatar Kubik-Rubik Kubik-Rubik - merge - 2 Mar 2015
avatar Kubik-Rubik Kubik-Rubik - close - 2 Mar 2015
avatar Kubik-Rubik Kubik-Rubik - change - 2 Mar 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-03-02 14:26:00

Add a Comment

Login with GitHub to post a comment