Major database package refactor underway

75 views
Skip to first unread message

Andrew Eddie

unread,
Feb 20, 2012, 6:43:34 AM2/20/12
to JPlatform
A few of us have had a go trying to bring Omar's database branch to
fruition. Here's the next update for final review and testing:

https://github.com/joomla/joomla-platform/pull/900

There are still a few holes but we'd like a bit of helper testing and
finalising the changes. The highlights include:

* A new database factory
* Moving the database connectors into a "drivers" folder
* Added oracle and pdo drivers
* Moving queries, exporters and importers into their own folders

There are a couple of other additions in the mix as well as a heap of
legacy support. If you are making corrections I'd appreciate it if
you make all your changes in a local branch and I can pull from there.
There are likely a lot of small things to fix and it will save time
that way.

I will try to add to the developer manual this week as well as,
hopefully, quite a few people help with the spit and polish. Extra
help with unit test code coverage would also be greatly appreciated.

Thanks in advance. If you have any questions, please ask.

Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla developers

Michael Babker

unread,
Feb 20, 2012, 6:52:48 AM2/20/12
to joomla-de...@googlegroups.com
One small correction thus far in JDatabaseDriver::getConnectors, changing
the base class name for the drivers. Pushed to my eddieajau_driver
branch. I'll keep looking at code throughout the day.

Andrew Eddie

unread,
Feb 20, 2012, 10:07:31 PM2/20/12
to joomla-de...@googlegroups.com
Pull request has moved to https://github.com/joomla/joomla-platform/pull/906

Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers

Michael Babker

unread,
Feb 21, 2012, 1:50:57 AM2/21/12
to joomla-de...@googlegroups.com
I've got two commits on my 'database' branch based from this new pull
request:

- One to correct the class name of the drivers in
JDatabaseDriver::getConnectors()
- One to reapply a change made to JDatabase(Driver)Sqlsrv::getVersion() in
#830

Louis Landry

unread,
Feb 21, 2012, 12:08:28 PM2/21/12
to joomla-de...@googlegroups.com
Thanks Michael, I've pulled them in.

84.le0n

unread,
Feb 21, 2012, 4:25:57 PM2/21/12
to joomla-de...@googlegroups.com
2012/2/21 Louis Landry <louis...@gmail.com>:

I'm waiting this pull request to be merged, so I'll refactor my
PostgreSQL driver on a clean branch.

Eng. Gabriele Pongelli.

Rouven Weßling

unread,
Feb 21, 2012, 4:30:35 PM2/21/12
to joomla-de...@googlegroups.com

On 21.02.2012, at 22:25, 84.le0n wrote:

> I'm waiting this pull request to be merged, so I'll refactor my
> PostgreSQL driver on a clean branch.

Merged. Jenkins should push it to master in about 15 minutes if all goes well.

Rouven

84.le0n

unread,
Feb 21, 2012, 5:05:06 PM2/21/12
to joomla-de...@googlegroups.com
2012/2/21 Rouven Weßling <m...@rouvenwessling.de>:

ok, tomorrow I'll create a new branch starting from actual master,
adding my postgresql classes, and then I'll submit another clean pull
request.

Eng. Gabriele Pongelli.

Andrew Eddie

unread,
Feb 21, 2012, 5:05:45 PM2/21/12
to joomla-de...@googlegroups.com
Thanks Rouven and to all that helped with this.

Gabriele that will be great if you can get the postgres driver done.

Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla developers

84.le0n

unread,
Feb 21, 2012, 5:12:17 PM2/21/12
to joomla-de...@googlegroups.com
2012/2/21 Andrew Eddie <mamb...@gmail.com>:

> Thanks Rouven and to all that helped with this.
>
> Gabriele that will be great if you can get the postgres driver done.
>
> Regards,
> Andrew Eddie
> http://learn.theartofjoomla.com - training videos for Joomla developers

It worked before last changes (folder, class names, new interfaces),
now I've to update to last changes happened these weeks.
I'll do my best to finish soon.

Eng. Gabriele Pongelli.

Louis Landry

unread,
Feb 21, 2012, 5:13:42 PM2/21/12
to joomla-de...@googlegroups.com
Absolutely Gabriele, looking forward to it.

I dunno if you are interested, but it may be simpler for you to simply build off of the JDatabaseDriverPdo class that exists in there.  I'm fine with either using that or going with the pgsql() functions built in, but hopefully this refactored database package will make it easier for us to extend things and keep the API clean moving forward.

Cheers.

- Louis

84.le0n

unread,
Feb 21, 2012, 5:25:07 PM2/21/12
to joomla-de...@googlegroups.com
2012/2/21 Louis Landry <louis...@gmail.com>:

> Absolutely Gabriele, looking forward to it.
>
> I dunno if you are interested, but it may be simpler for you to simply build
> off of the JDatabaseDriverPdo class that exists in there.  I'm fine with
> either using that or going with the pgsql() functions built in, but
> hopefully this refactored database package will make it easier for us to
> extend things and keep the API clean moving forward.
>
> Cheers.
>
> - Louis

@Louis
I've watched pdo driver, but sincerely now I'm confident of my work
(I've tested it with PHPUnit, installing CMS and doing
platform-examples too) and refactor it means that I'll have to spend
time on this task, and I haven't .
Maybe I'll change in future, but not now, sorry.

Eng. Gabriele Pongelli.

Louis Landry

unread,
Feb 21, 2012, 5:36:37 PM2/21/12
to joomla-de...@googlegroups.com
All good, very much looking forward to having postgresql having first class support in the platform.  Thanks for holding the torch for so long.

- Louis

84.le0n

unread,
Feb 23, 2012, 5:16:11 PM2/23/12
to joomla-de...@googlegroups.com
2012/2/21 Louis Landry <louis...@gmail.com>:


Pull request sent:
#916 about adding subqueries support in FROM and INSERT INTO query element
#917 about PostgreSQL driver.

Eng. Gabriele Pongelli.

Reply all
Reply to author
Forward
0 new messages