[TYPO3-core] RFC #14120: Add a method to check if database is connected

Xavier Perseguers typo3 at perseguers.ch
Thu Apr 15 12:20:54 CEST 2010


Hi,

> Problem: There is no reliable method to check if database is connected in
> TYPO3. In case if native implementation is used, $TYPO3_DB->link can be
> checked. In case of DBAL there is no solution without knowing DBAL
> internals. I realized this fact when looked to #14117.
>
> Solution: the patch adds a new generic function named "isConnected" to
> t3lib_db and DBAL. Xavier's review is required for this patch!
>
> Note: while we have a feature freeze now, this is not a "user" feature but
> a handy function in t3lib_db. I hope Benni will have no objections against
> adding it to 4.4.

I agree this should go into 4.4.

Funny, I thought a few days ago that I would like to have such method in order to deactivate content rendering from an offline database containing business data while not preventing the whole website 
using an online DB to be made unavailable.

+1 after reading and testing.

Please note:

- Core patch should not contain DBAL diff, this has to be put into a separate file
- Enclosed is the DBAL version I reworked to take advantage of it in my unit tests

If you'll going to commit into DBAL, please:

- Commit to DBAL trunk and branch DBAL_1-1 (the branch dedicated to TYPO3 4.4)
- Update file ChangeLog

I may take care of it if it's easier for you.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14120_dbal.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100415/80d9ea0b/attachment.txt>


More information about the TYPO3-team-core mailing list