Commit graph

7 commits

Author SHA1 Message Date
Max Semenik
6b7317c91f Added support for stored procedures/functions to MySQL:
* Refactored DatabaseBase::sourceStream(), made it possible for descendant classes to alter its behaviour w/o having to redo it completely like Oracle does.
* MySQL class now supports specifying DELIMITER.
* Thrown away the mess of catering for double semicolon. If it's a problem, fix your .sql files!
* Haven't actually touched Oracle.
* Tests!
2011-12-27 12:29:36 +00:00
Chad Horohoe
30926a2c3c Revert r87992 and followups r87998, r89028 (Support abstraction for 'NOT IN' SQL structure). Per discussion on CR and elsewhere...we're not 100% sold on the new format yet.
Changing the database api like this should be carefully thought out before we get stuck with it for 6 more years and end up hating it.
2011-09-13 00:19:04 +00:00
Jure Kajzer
edd10806bc * merge r89759 from REL1_17 into trunk
* changed addQuotes expected result for addQuotes in DatabaseTest
2011-06-09 08:43:53 +00:00
Antoine Musso
716d85ad7e * Fix db->makeList() spacing
* Tests assertions where upside-down (expected <-> value)
* Tests did not use LIST_AND

Follow up r87992
2011-05-28 09:03:44 +00:00
Antoine Musso
ba564eeb7c Support abstraction for 'NOT IN' SQL structure
Following a live discussion with Catrope.

When using Database::makeList() in LIST_AND or LIST_OR modes, you can now
suffix the field name with an exclamation mark.  It will negate the logical
boolean.

Example:
  $db->makeList( array( 'field!' => array( 1,2,3 ) );
  outputs:
    'field' NOT IN ('1', '2', '3' );

 $db->makeList( array( 'foo!' => array( 777 ) ) );
 outputs:
   'foo' =! 777

(note: tests not ran, please run them and ammend them)
2011-05-13 15:39:45 +00:00
Chad Horohoe
447529064b * verbose and color default output from phpunit
* Make a bunch of tests subclass MediaWikiTestCase
* Parser tests and ResourceLoaderTest can't subclass it yet due to various issues
2010-12-28 18:17:16 +00:00
Chad Horohoe
23f69f10ed Per wikitech-l discussion: Move tests from maintenance/tests/ to tests/. They're not strictly maintenance scripts, and some people want to do a selective checkout that doesn't include the tests. There's still debate on whether we should include these in the release downloads, but we had a pretty firm consensus to move this. 2010-12-14 16:26:35 +00:00