Page MenuHomePhabricator

Oracle Single Schema database abstraction
Closed, ResolvedPublic

Description

Author: freak

Description:
Removed the last few hardcoded LIMIT clauses i could find, replaced with limitResult function.
Changed fetchAssoc function name to fetchRow overload in DatabaseOracle.php
Added OracleSS database abstraction.

This DB abstraction uses Oracle as DB with multiple wiki instances stored into a single schema. All tables are wrapped with views which make use of a package variable set in constructor to identify current wiki instance.

Also added:

  • makeList and selectRow function overloads.
  • ORAField class and fieldExists, fieldInfo implementations which use data from a preparsed table (dynmaic query was too slow)
  • query ignore errors, ignoring of DUP_VAL_ON_INDEX on insert
  • infinity keyword is replaced with a large timestamp (31-DEC-30 12.00.00.000000 AM)

Database import script will be supplied just as soon as i get it from our DBA.


Version: 1.15.x
Severity: enhancement
URL: http://www.abakus.si/jk/jksvn/

Details

Reference
bz18492

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:32 PM
bzimport set Reference to bz18492.
bzimport added a subscriber: Unknown Object (MLST).

freak wrote:

Multiple patches archive

attachment 17042009_1018.tar ignored as obsolete

(In reply to comment #1)

Created an attachment (id=6032) [details]
Multiple patches archive

There's no need to put multiple patches in one archive. If you just run "svn diff" on the command line, it'll generate one big patch for you that's way easier for us to review and apply.

freak wrote:

Noted, will do in future.

freak wrote:

Previous attachment in correct form

attachment 18042009_1444.diff ignored as obsolete

(In reply to comment #4)

Created an attachment (id=6035) [details]
Previous attachment in correct form

Some trivial problems with this patch:

  • you have a typo in Article.php: limitResults() should be limitResult()
  • the patch removes WantedQueryPage from AutoLoader.php
  • you're copying code from Database::construct() to DatabaseOracleSS::construct(), instead just call parent::__construct(). This trick works for other functions as well (haven't checked for code duplication everywhere)
  • use Doxygen comments (/** ... */) for the docs above a function declaration. Hash comments (# ...) won't work there

This really needs to be reviewed by someone with more DB expertise than I have, though

freak wrote:

fixed patch 2

Attached:

freak wrote:

Comment on attachment 6039
fixed patch 2

Typos fixed.

As for DatabaseOracleSS. This was done by modifying DatabaseOracle class currently in SVN trunk ... comments and construtor are more-less unchanged. I'll take a moment on Monday to apply requested changes.

freak wrote:

fixed DatabaseOracleSS as requested

fixed constructor
replaced Hash comments with Doxygen

Attached:

freak wrote:

Patch was denied. Changes will be split into core changes to DatabaseOracle class and an extension for single schema use of Oracle DB.