Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

DML drivers

From MoodleDocs

Moodle 2.0

Previous versions were using adodb abstraction partially encapsulated by old DML api. The database drivers are now fully separated from the rest of code and it is even possible to create new native drivers that do not rely on adodb abstraction anymore.

At present there are two sample native drivers - mysqli and pgsql. The benefits are:

  • more optimised and probably faster
  • consume less memory
  • better possibility to improve logging, debugging, profiling, etc.
  • less code, easier to fix and maintain
  • and more

Please note that native drivers are now used by default in HEAD because we need to get as much testing as possible ;-)

TODO

  • add more info here
  • add separate docs pages for each driver - describe all options there

See also

  • DML functions: Where all the functions used to handle DB data (DML) are defined.
  • DML exceptions: New DML code is throwing exceptions instead of returning false if anything goes wrong