Commit graph

89 commits

Author SHA1 Message Date
Greg Sabino Mullane
7e27f2fa57 Add currentSequenceValue() function. 2007-12-18 15:44:18 +00:00
Greg Sabino Mullane
2b49edf3fc Move initial connection checks into their own function. 2007-12-16 16:34:30 +00:00
Greg Sabino Mullane
e754912024 Call quote_ident on raw schema names, per bug 11952. 2007-12-06 17:55:50 +00:00
Greg Sabino Mullane
8bf7aad24a Force string to UTF-8 if we have mb stuff available. 2007-11-05 15:21:59 +00:00
Greg Sabino Mullane
a9f7acf9d3 Postgres updating:
Map bpchar to char
Don't change default search_path if schema not 'mediawiki' in LocalSettings
Clean up the output of updaters.inc
Make sure we set search_path and others for current session when altering user.
2007-09-28 14:57:19 +00:00
Greg Sabino Mullane
12bea7a9d5 Use same typnames as schema for ease. Put added column before column type checks. 2007-09-28 14:03:06 +00:00
Greg Sabino Mullane
0ab8c7e910 Make CONCAT calls database portable, change IF() to standard CASE-WHEN calls.
Postgres: replace CHAR(64) with TEXT for fa_storage_key of filearchive
Postgres: Add hasConstraint to allow replacing of oldimage fk constraint
Postgres: make oldimage cascade delete on image deletion
2007-09-23 22:23:01 +00:00
Greg Sabino Mullane
7b9616a21c Fix bug 11292, unserialize errors with Postgres, by changing from array to object when slinging around blobs. 2007-09-23 19:54:56 +00:00
Greg Sabino Mullane
b3e314d361 Set search_path on Postgres if wgDBmwschema != 'mediawiki' to support multiple wikis for a single user, per discussion on bug 11136 2007-09-19 02:31:28 +00:00
Greg Sabino Mullane
8eb82ee407 Add implicitOrderby() to make sure that SpecialAllpages uses an ORDER BY when needed.
Made this an option rather than forcing the ORDER BY as testing show MySQL is 
faster without it for large tables.
2007-09-02 18:03:10 +00:00
Greg Sabino Mullane
9131a9b25e Multi-insert appeared in Postgres 8.2, not 8.1
Bug #10763.
2007-08-09 17:34:34 +00:00
Greg Sabino Mullane
4fffb261dd Add function to check if function-based indexes are supported by the backend DB. 2007-07-30 14:10:42 +00:00
Greg Sabino Mullane
770f0180c5 Fix bug 10608, plus a bonus one that was hidden by that bug. 2007-07-16 21:28:01 +00:00
Yuri Astrakhan
5a0bbe0a1a bug 10496 DISTINCT option logic incorrect in Database::makeSelectOptions 2007-07-07 21:51:06 +00:00
Tim Starling
9382bc7a85 Return a ResultWrapper from Database::query() and query builder functions, instead of a raw DB result resource. Backwards compatibility is maintained, except with naughty code that was calling database driver functions directly on result objects. 2007-07-05 19:42:18 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Greg Sabino Mullane
85ae757734 getLag() returns false, not 0. Add reminder about future code refactoring. 2007-06-22 22:00:58 +00:00
Greg Sabino Mullane
ad9595593b Return raw bytea string, not arrayified version for encodeBlob() 2007-06-22 18:45:10 +00:00
Greg Sabino Mullane
5860ba1894 Revert to correct encodeBlob() function 2007-06-11 18:40:31 +00:00
Greg Sabino Mullane
edea5f726e Fix up encodeBlob, don't worry so much about indexInfo compat. 2007-06-08 00:57:22 +00:00
Greg Sabino Mullane
dd168ed6ea Return true/false, not o/not-0 for relation checking functions, for those parts of the code that demand "result === false" rather than saying (!result) 2007-06-07 14:02:46 +00:00
Rob Church
73fda35eef (bug 10104) Provide stub "getLag()" function for DatabaseOracle and DatabasePostgres 2007-06-04 21:43:02 +00:00
Greg Sabino Mullane
277ea8a8d4 The variable mLastResult may be null /or/ false: check for both in affected rows method. 2007-05-29 20:28:59 +00:00
Greg Sabino Mullane
5b79cfb9b1 More defined() that should be isset(), thanks to David Ford, david@blue-labs.org 2007-05-16 20:31:58 +00:00
Greg Sabino Mullane
315aa73dc8 Replace defined with isset, thanks to David Ford, david@blue-labs.org 2007-05-16 20:29:05 +00:00
Greg Sabino Mullane
3658901cbe Re-add tableName call to insert, whitespace/docs cleanup. 2007-05-15 12:14:20 +00:00
Greg Sabino Mullane
9e41dca13e Redo insert() function: support IGNORE option, support multi-values.
Fixes bug #9417
2007-05-15 02:59:20 +00:00
Aaron Schulz
ccb7b43392 *Support for HAVING clause 2007-05-04 22:54:13 +00:00
Greg Sabino Mullane
6230a0863f Ignore USE INDEX option. 2007-05-02 17:35:50 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Greg Sabino Mullane
ba31b5beb3 Add constraintExists function, mild cleanup of other nearby funcs. 2007-04-19 01:35:15 +00:00
Aryeh Gregor
09f7aa034e "@todo no-op" sounds a bit peculiar. ;) 2007-04-18 16:37:39 +00:00
Nick Jenkins
9648f3b4d0 Some small doc tweaks to reduce Doxygen warnings, namely:
* @link. You might think @link would surely mean "here comes a web URL" ... but @link is a valid command 
  in Doxygen, which means an entirely different kind of link (an internal link to somewhere, so that you can separate 
  documentation and implementation). The result is a mess, and the best solution I can see is to use "@see" instead of "@link".
* Warning: argument `nourl' of command @param is not found in the argument list of Linker::makeMediaLinkObj($title,$text='')
* Moving few class descriptions to right above classes, and/or formatting into Javadoc style.
* "@addtogroup Special Pages" --> "@addtogroup SpecialPage" so that all special pages have the same @addtogroup tag.
* @fixme --> @todo (must have missed these before)
* "@param $specialPage @see" remove the "@" in the "@see" to stop warning.
* @throws wants type, then a brief description, to stop warning.

This last one is for PHPdocumentor only, but it fixes something for PHPDocumentor, and should be neutral for Doxygen:
* WARNING in includes/api/ApiFormatYaml_spyc.php on line 860: docblock template never terminated with /**#@-*/
2007-04-18 09:50:10 +00:00
Greg Sabino Mullane
971982db12 Add estimateRowCount(), to support changes made in r21071 2007-04-07 17:46:17 +00:00
Greg Sabino Mullane
347bf78ab6 Enforce a consistent datestyle, just in case. 2007-04-03 22:15:30 +00:00
Greg Sabino Mullane
ca5ec022ae Switch to always return GMT time. 2007-03-28 15:53:15 +00:00
Brion Vibber
4475d36182 Revert $wgDBtimezone commits: r20688, 20689, 20690, 20691.
Alters behavior of wfTimestamp() and wfTimestampNow() in clearly broken ways, such that current time would not return current time anymore.
2007-03-27 19:39:37 +00:00
Greg Sabino Mullane
72cb540911 Find out the local db timezone 2007-03-26 01:13:39 +00:00
Greg Sabino Mullane
bca55fa58f Account for pre-existing test table, commit only if setup completes. 2007-03-26 00:12:26 +00:00
Greg Sabino Mullane
3b49980821 Mild formatting, fix missing '$' 2007-03-25 23:53:36 +00:00
Greg Sabino Mullane
d6456e1e41 Remove variables when we can simply override accessors instead. 2007-03-21 18:19:35 +00:00
River Tarnell
89b14494bb - strict warning fixes in databasepostgres
- PG updaters should use general Database methods instead of reimplementing in updaters.inc
- fieldInfo should work for postgres; generalise result to an object type
- add missing *Exists() functions (rules, triggers, sequences)
2007-03-19 02:40:32 +00:00
Greg Sabino Mullane
2194fa6ed0 Typo, minor rearrangements, 2007-03-14 16:34:50 +00:00
River Tarnell
67cc9eaef3 limitResult() changes need fiddling to put options in right order 2007-03-11 15:49:27 +00:00
River Tarnell
033b6b9646 revive experimental Oracle support
fix use of limitResult(); must pass actual SQL, not empty string
2007-03-11 03:59:37 +00:00
Brion Vibber
3caa998c8c prettify:
* set_timeout() -> setTimeout()
* remove a couple obsolete references from dump code
2007-03-09 15:26:41 +00:00
River Tarnell
e8306706e8 dumpBackup should instantiate correct database class for db type
add set_timeout() method to Database
2007-03-09 02:04:36 +00:00
Leon Weber
1cda921f5a * (bug 8988) Added missing $ in error messages. 2007-02-14 16:07:18 +00:00
Greg Sabino Mullane
934d8c41e4 Add searchableIPs differentiator 2007-01-23 14:47:12 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00