CodeIgniter Forums
Database Extends - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Database Extends (/showthread.php?tid=89047)



Database Extends - byazrail - 12-28-2023

Hi guys,

Is it possible to extend the Database Library?

The reason I want to extend is as follows;
1- Use of Master and Replica in Database Connection.
2- To process transactions on master or replica based on the style of query usage.

Usage style;
I use the master connection (Port 5432) for INSERT, UPDATE, DELETE, TRANSACTIONS queries.
I use the replica connection (Port 5433) for SELECT queries.

The reason I want to extend the database library is that I manually intervene in the CodeIgniter core files.
When a new version of CodeIgniter is released, I have to repeatedly change the core files.

Example database connection ports;
Master: 5432
Replica: 5433 - multiple replica nodes.


RE: Database Extends - kenjis - 12-28-2023

See https://forum.codeigniter.com/thread-78294-post-383813.html