* made insertOneRow and getSequenceData private
* renamed fieldInfo to fieldInfoMulti and made it private (for internal use on Oracle only)
* wrapped fieldInfoMulti in fieldInfo with error if $table parameter is an array
* reverted tableName function to only support a non-array parameter
* wrapped all tableName calls with array parameter with array_map with callback
* wrapped fieldInfo into textFieldSize function to avoid reimplementation of functionality
* fixed unnessesary multiple calls to tableName with same parameter inside a single procedure
* fieldExists reduced to bool-cast output of fieldInfo
* added negative cache (handled acordingly on fieldInfo usage)
* uppercased parameters on entry. DB data is uppercased by default
Before this change, there were (? being regex 0 or 1)
"" ===? 1
'' ===? 24
"" !==? 8
'' !==? 32
== "" 14
== '' 344
!= "" 9
!== "" 4
!= '' 151
!== '' 85
Rhs was the much more common, and the preferred style by many developers.. (Was a similar discussion in #mediawiki recently.. After that lolbugreport i think)
Where there is a string (non empty) on the lhs, and variable/method call on the rhs still need normalising
Please follow <http://www.mediawiki.org/wiki/Manual:Coding_conventions>
so that code is easier to read. (For anyone whose blames are getting
messed up by whitespace changes, use svn blame -x -w, or git blame -w,
to ignore them.)
Updated all nextSequenceValue calls with new sequence names.
OverlordQ stated he'll handle changes to Postgres scripts.
Need someone to change DB2 scripts.
Also make it abstract in DatabaseBase so all subclasses have to implement some human readable name
(also make getSoftwareLink abstract for the same reason) Every current Database class already implements both.
Notably, this will switch conditional() in MySQL from using IF() to
using CASE, like all other DBMSes. Documentation suggests this works
back to 4.0. If it's a problem, it's a matter of a few lines to
override it in DatabaseMysql.php.
Also, some extra explanatory comments have been added to a number of
methods in DatabaseBase.
Specifically freeResult(), selectDB(), close(), and ping(), as suggested
by Tim on code review for r51918. Where these were overridden by stubs
in subclasses, I deleted the stubs.
All other databases were changed to extend DatabaseBase instead of
Database. Database was kept as an alias for DatabaseMysql for
compatibility. Existing explicit references to Database that I could
find were changed to DatabaseMysql for the sake of clarity.
Should cause no functional changes.
Rewriten tables.sql, added user.sql (creating db user with privileges)
Fixed epoch in Special Ancientpages and Unusedimages
Timestamp default format altered in db abstraction and changed wfTimestamp function
SearchOracle changed to return empty resultset on empty term search (query error in oracle)
TODO: Maintenance scripts update
* renamed \2types and \3types both to \types (with different number of param), Doxygen doesn't seem to like numbers in aliases
* Added aliases for @private, @protected and @public
or Database::newFromParams() explicitly at the moment. While that's already bad (breaking PG support etc), I'd rather see those get fixed before we go introducing differences between Database and DatabaseMySql.
* Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up.
* Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included.
2008-06-16 20:21:26 +00:00
Renamed from includes/DatabaseOracle.php (Browse further)