Method | Description | |
---|---|---|
__construct ( ) | Dummy constructor to throw an exception | |
forceError ( ) : boolean | Creates a database error on the database. | |
getPoolSize ( ) : integer | Get pool size for connection pools | |
getSlave ( ) : boolean | Returns the address being used by this for slaveOkay reads | |
getSlaveOkay ( ) : boolean | Get slaveOkay setting for this connection | |
lastError ( ) : array | null | Check if there was an error on the most recent db operation performed | |
pairConnect ( ) : boolean | Connects to paired database server | |
pairPersistConnect ( string $username = "", string $password = "" ) : boolean | Creates a persistent connection with paired database servers | |
persistConnect ( string $username = "", string $password = "" ) : boolean | Creates a persistent connection with a database server | |
poolDebug ( ) : array | Returns information about all connection pools. | |
prevError ( ) : array | Checks for the last error thrown during a database operation | |
resetError ( ) : array | Clears any flagged errors on the connection | |
setPoolSize ( $size ) : boolean | Set the size for future connection pools. | |
setSlaveOkay ( boolean $ok ) : boolean | Change slaveOkay setting for this connection | |
switchSlave ( ) : string | Choose a new secondary for slaveOkay reads |
Method | Description | |
---|---|---|
connectUtil ( ) : boolean | Connects with a database server | |
notImplemented ( ) |
protected connectUtil ( ) : boolean | ||
return | boolean | If the connection was successful. |
public forceError ( ) : boolean | ||
return | boolean | The database response. |
public getPoolSize ( ) : integer | ||
return | integer | Returns the current pool size. |
public getSlaveOkay ( ) : boolean | ||
return | boolean | Returns the value of slaveOkay for this instance. |
public pairConnect ( ) : boolean | ||
return | boolean |
public resetError ( ) : array | ||
return | array | Returns the database response. |
public setPoolSize ( $size ) : boolean | ||
$size | The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections. |
|
return | boolean | Returns the former value of pool size. |
public setSlaveOkay ( boolean $ok ) : boolean | ||
$ok | boolean | |
return | boolean | returns the former value of slaveOkay for this instance. |
public switchSlave ( ) : string | ||
return | string | The address of the secondary this connection is using for reads. This may be the same as the previous address as addresses are randomly chosen. It may return only one address if only one secondary (or only the primary) is available. |