User tests: Successful: Unsuccessful:
Pull Request for Issue #10567.
Related to older implementation at #12839 which requires postgreSQL >= 8.4.2.
JTable::reorder()
method with B/C.JDatabaseQuery::selectRowNumber($orderBy, $orderColumnAlias)
which add an additional incremental column to SELECT type query.selectRowNumber
only once per query.row_number
column.selectRowNumber()
row_number
column - you can use safely $db->loadRowList()
, examples:
row_number
is always on the last column, This is related to index column at loadRow()
and loadRowList()
.INSERT OR REPLACE INTO
ROW_NUMBER(init=null, partitionBy=null)
after establish a connection.selectRowNumber
and multi table UPDATE query.If something went wrong then test it first without PR.
After this PR result should be the same.
[UPDATED]
How to test on postgreSQL
PostgreSQL Query has 2 versions of code which depend on postgresql server version (< 8.4 or >= 8.4).
So it would be good to test 2 options but as usual there is probably nobody with postgresql >= 8.3.18 and < 8.4.
{
{ return '8.3.18';
Probably.
Introduce a new public method JDatabaseQuery::selectRowNumber()
.
Main database drivers (mysql, postgresql, sqlsrv and sqlite) can use Update with innerJoin.
SQLite driver has a new sqlite function ROW_NUMBER(init=null, partitionBy=null)
.
I tested this on MariaDB 10.0.27, php 7.0.8 on my laptop.
Status | New | ⇒ | Pending |
Category | ⇒ | Postgresql Libraries MS SQL Unit Tests |
Labels |
Added:
?
?
|
@csthomas would you consider also adding the JDatabaseQuery
selectRowNumber()
method and related changes to the Framework database repo
I will but now I want to add it to joomla 3.7.
Title |
|
I have added two versions of selectRowNumber()
, for postgresql >= 8.4.0 and other for less than 8.4.0.
I have tested this item
With and without PR Result is same ordering like in "Testing instruction" described.
I have tested this item
Tested on mysql version 5.5.53-0ubuntu0.14.04.1
Before patch
COUNT :1116
TIME DIFF : 5.6671
After patch
COUNT :1120
TIME DIFF : 0.0319
It was successful following the Testing instruction.
But when i do the following, with or without the PR :
Any ideas on this anomaly ?
check the articles (articleA, articleB, articleC) and hit "Feature" and we still see the same ordering
this is ok, you add articles to featured but list order is by article ordering (not featured ordering)
go to Featured Articles list and set order list by "Ordering asceding" we see on the top of list (articleB, articleC, articleA, ...olders...).
You add in one time 3 articles to featured, sql will deliver 3 featured with ordering=0 to reorder. IMO It won't preserve any order. it is a set of 3 articles, not ordered list of 3 items.
@waader @alikon @photodude Can you help with test? (mainly postgresql, but it would be nice to test mssql too)
@csthomas I'm currently primarily working on the Windows CI testing with Appveyor
See
joomla-framework/database#72
joomla-framework/database#74
joomla-framework/database#75
#13690
and the Alpha of the PHPCS 2 coding standards autofixers release see
joomla/coding-standards#143
So I haven't had time to test CMS specific PRs (my current local needs to be rebuilt too, especially for any PostgreSQL or MSSQL testing).
If you would be willing to pitch in on those projects, I could allocate time to setup a local for testing here.
There is some additional consideration with PostgreSQL or MSSQL testing, we often only merge those by code review especially when MySQL passes, or if there are no MySQL related changes. Since the change will be held up if try to find someone with a system configuration that meets those edge case requirements and time to test. Final call on a Merge by review would need to be made by the release leader or someone else with commit privileges.
I have tested this item
Tested on psql (PostgreSQL) 9.3.15
Before the patch
COUNT : 4044
TIME DIFF : 36.7341 sec
After the patch
COUNT : 4044
TIME DIFF : 0.1496 sec
Status | Pending | ⇒ | Ready to Commit |
Labels |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-27 18:23:06 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
With testing data installed frontend gives an "404 Component not found" error. Starting with index.php?option=com_content the page loads. The module helper notices are also present and no modul content is displayed.