CodeIgniter Forums
Database test mode in model - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: Database test mode in model (/showthread.php?tid=75960)

Database test mode in model - kyle - 04-01-2020

I am looking for a way to use the built in transaction test mode while accessing my data through the Codeigniter Model. I want to be able to use test mode while I am developing my site to test my database functions without modifying anything.

If you manually initiate a transaction, you can set test mode to on by setting the first parameter to "true". 
PHP Code:
$this->db->query('AN SQL QUERY...');

Is there any way to do this through the model? Or in the Database configuration settings?

Or is there a way to override the default database connection to allow for a custom setting to be put in the transStart function?