Download the PHP package indievox/master-slave-db-access without Composer
On this page you can find all versions of the php package indievox/master-slave-db-access. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download indievox/master-slave-db-access
More information about indievox/master-slave-db-access
Files in indievox/master-slave-db-access
Package master-slave-db-access
Short Description 簡易的 MySQL database 伺服器存取類別,使用 POD 及 singleton pattern 實作,支援 Master-Slave 架構。 / Simple MySQL database server access class use PDO and singleton pattern, support Master-Slave database cluster.
License MIT
Informations about the package master-slave-db-access
Master Slave DBAccess
簡易的 MySQL database 伺服器存取類別,使用 POD 及 singleton pattern 實作,支援 Master-Slave 架構。
Simple MySQL database server access class use PDO and singleton pattern, support Master-Slave database cluster.
Usage
Install by composer
Include auto load
Config your database connections
Here's the example of database connection config
Get database access instance
Use database access instance to excute query
Force read master database when you need
Use "right" method to excute query, the class will auto switch to right read/write connection to process the query
Sometimes you want to use master server in the whole context
License
The MIT License (MIT)
Copyright (c) 2016 iNDIEVOX
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.