Commit Graph

146 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 870896eca1 MDL-30147 dml - mysql and no params now behaving "standard" 2011-11-19 09:27:10 +01:00
Petr Skoda c04e80e328 MDL-30147 detect missing table when processing query conditions 2011-11-19 09:16:51 +01:00
Petr Skoda 2b0e3941e9 MDL-30026 improve session lock acquire timeouts and other minor cleanup
This is partially based on original patch by Tony Levi.
2011-11-06 17:52:15 +01:00
Aparup Banerjee e2e1cf53db Merge branch 'MDL-29198' of git://github.com/stronk7/moodle 2011-09-05 12:10:32 +08:00
Tim Hunt 8de7858fb9 MDL-28080 coding_exception for over-long placeholder names. 2011-09-01 11:47:40 +02:00
Eloy Lafuente (stronk7) 4b5c84ae30 MDL-29198 DB - make delete_records transactional safe when needed 2011-09-01 11:05:21 +02:00
Petr Skoda bce595034c verify where_clause() only in debug mode 2011-08-05 21:33:16 +02:00
Andrew Robert Nicols b7eceef75f MDL-28193 Add $external arg to get_driver_instance
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
2011-07-05 12:22:41 +01:00
Tim Hunt cfcf9bb4e3 MDL-27897 moodle_database::get_in_or_equal must not use a static variable.
It makes unit testing impossible. Switch to a field.
2011-06-17 11:26:51 +01:00
Petr Skoda 906c957b63 MDL-27148 use static counter instead of incrementing parameter name 2011-04-14 14:50:35 +02:00
Eloy Lafuente (stronk7) c7ce62f9c8 MDL-26542 get_in_or_equal - adding $onemptyitems + tests 2011-03-30 18:22:53 +02:00
Petr Skoda 200b4556d7 MDL-26842 make sure query parameter names are not reserved words in oracle driver 2011-03-16 15:20:32 +01:00
Eloy Lafuente (stronk7) 5a4a7b425b MDL-25708 recordsets - fix upgradelib and dml stuff 2011-01-25 19:59:00 +01:00
Aparup Banerjee 011bfd2a54 database MDL-24863
- added restricting text conditions to where_clause , it throws a dml_exception when detected.
- also added to where_clause throwing dml_exception for field that doesn't exist in table.
- added unit tests for text condition restricting.
- added 2 unit tests for set_field_select() testing 'auto-casting params to int problem' fix
2010-11-18 06:00:51 +00:00
Petr Skoda ac6f1a82f9 MDL-24321 switching to stdClass 2010-09-21 07:57:42 +00:00
Petr Skoda b968cf3501 MDL-19057 simplified fake conditions, no need to bind params here 2010-09-14 19:19:30 +00:00
Petr Skoda d868e87934 MDL-19057 fixed more phpdocs 2010-09-06 14:11:38 +00:00
Petr Skoda ded99d1ab2 MDL-19057 fixed phpdocs 2010-09-06 14:10:52 +00:00
Petr Skoda 89e87570b6 MDL-19057 fixed docs 2010-09-06 12:50:17 +00:00
Petr Skoda f358b06a1e MDL-19057 fixed get instance docs 2010-09-06 12:47:57 +00:00
Petr Skoda 16114b9db8 MDL-24080 new $notlike parameter added to our new sql_like(), hopefully nobody started using the $escaped param yet; unittests included 2010-09-04 14:39:01 +00:00
Petr Skoda 2f8eea3415 MDL-24079 finally the sql_ilike() is deprecated 2010-09-04 14:23:50 +00:00
Petr Skoda 0e6e90516a MDL-24028 cast all bools in DML params to integers 1/0; credit goes to Eloy Lafuente 2010-09-03 15:44:11 +00:00
Petr Skoda 915ee3f9df MDL-23925 completely reverting binary comparison hack, we have to instruct admins to setup case+accent sensitive collation as default instead 2010-08-25 11:18:37 +00:00
Petr Skoda 6055f89d30 MDL-23925, MDL-23888 new sql_ilike() and sql_binary_equal() - this should finally allow us to solve many collation issues consistently for all supported databases; please note this changes some behaviour for non-english languages when mysql used; expect more commits that actually make use of these new features 2010-08-24 21:50:53 +00:00
Petr Skoda 38ead57d34 MDL-14679 more phpdocs improvements - fixed param types 2010-08-22 19:32:37 +00:00
Petr Skoda 3d54726fd4 MDL-14679 more phpdocs improvements 2010-08-22 19:26:48 +00:00
Petr Skoda 9331d879eb MDL-14679 more return types added 2010-08-22 19:06:06 +00:00
Petr Skoda f688db7d57 fixed comment typo 2010-08-22 19:01:09 +00:00
Petr Skoda 3503dcad31 MDL-14679 fixing more incorrect return types 2010-08-22 19:00:28 +00:00
Petr Skoda 5212b07f20 MDL-14679 fixing incorrect return type of recordset methods 2010-08-22 18:55:29 +00:00
Petr Skoda d35ece6cce MDL-23682 new MySQL engine diagnostics + InnoDB is now used instead of MyISAM in new installs if available + improved mysql transaction support 2010-08-18 16:47:00 +00:00
Petr Skoda 66c0ee78a5 MDL-21249 fixed wrong package grrrrrr, thanks Eloy! 2010-07-25 20:18:39 +00:00
Petr Skoda f2ed3f05a7 MDL-21249 improved php docs and adding direct access prevention in dml 2010-07-25 12:57:24 +00:00
Sam Marshall b3f1efb553 dml NOBUG Corrected out of date phpdoc comment 2010-06-16 10:13:41 +00:00
Petr Skoda 862d54c314 fixed a large number of typos in comments :-( 2010-05-21 18:18:42 +00:00
Eloy Lafuente 10f375aa2e MDL-22076 temptables - warn and dropped on disposal 2010-04-21 16:12:27 +00:00
Eloy Lafuente cd6d352396 NOBUG: Normalise generated param names so we can safely use sql_xxx() helper functions everywhere. 2010-03-22 18:06:59 +00:00
Eloy Lafuente 63b3d8abb4 MDL-21264 sql_isnotempty() fixed. Thanks Tim!
Added (and passed) a bunch of tests for that function.
2010-01-07 14:59:54 +00:00
Petr Skoda 07b81ebd2d MDL-20625 coding help - better detection of missing commit or rollback 2009-11-08 21:19:11 +00:00
Petr Skoda d5a8d9aa71 MDL-20625 new delegated transaction support in DML 2009-11-07 08:52:56 +00:00
Eloy Lafuente e3acc8af7a MDL-20734 normalise_value() - moving from private to protected everywhere and abstracting 2009-11-04 13:19:11 +00:00
stronk7 ab62bd23ff MDL-14679 tidy phpdocs for sql_substr() a bit 2009-10-09 10:02:39 +00:00
skodak eb123debc6 MDL-19474 One year and a half ago we started designing and implementing our new databse abstraction layer which included brand new moodle native drivers. Today we are finally removing old legacy drivers that were still using adodb internally. From now on the adodb will be used only in some authentication and enrolment plugins, we are probably going to drop adodb there too later in 2.x. Thanks everybody who helped test and improve our new drivers, even bigger thanks to all the great developers who created ADOdb! 2009-10-08 22:34:34 +00:00
mudrd8mz 44f6ca9e11 MDL-20334 re-fix - small performance improvement
As Petr suggested, is_array() is faster than empty() so it makes sense
to check it first.
2009-09-22 21:18:29 +00:00
mudrd8mz 1336c8ebca MDL-20334 get_in_or_equal() does not accept empty array 2009-09-22 21:03:38 +00:00
stronk7 e4a16bdc88 Delegate prefix subtitution to each db driver to enforce calls to fix_sql_params() everywhere 2009-08-29 00:08:55 +00:00
skodak 2bad34a309 MDL-19689 fixed strictness constants, thanks Tim 2009-07-04 10:53:57 +00:00
skodak e6c6531cce MDL-19689 fixed strictness constants, thanks Tim 2009-07-04 09:30:59 +00:00
skodak af12ea93ba MDL-19689 new $strictness parameter in $DB->get_record() and $DB->get_field() family of DML methods 2009-07-03 22:38:56 +00:00