MAX_TOKEN
MAX_TOKEN
TOKEN最大值
Class MysqlAsynPool
$dbQueryBuilder : \PG\MSF\Pools\Miner
$swooleServer : \PG\MSF\MSFServer
$asynManager : \PG\MSF\Pools\AsynPoolManager
$mysqlClient : \PG\MSF\Pools\Miner
serverInit(\PG\MSF\MSFServer $swooleServer, \PG\MSF\Pools\AsynPoolManager $asynManager) : $this
初始化
\PG\MSF\MSFServer | $swooleServer | Server实例 |
\PG\MSF\Pools\AsynPoolManager | $asynManager | 异步连接池管理器 |
getSync() : \PG\MSF\Pools\Miner
获取同步
getDBQueryBuilder(\PG\MSF\Helpers\Context $context = null) : \PG\MSF\Pools\Miner
获取DB Query Builder
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
freeBind(\PG\MSF\Helpers\Context $context, integer $bindId)
释放绑定
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
integer | $bindId | bind ID |
begin(\PG\MSF\Helpers\Context $context, mixed $object, callable $callback) : string
开启一个事务
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
mixed | $object | 绑定对象 |
callable | $callback | 执行完成后的回调函数 |
bind(\PG\MSF\Helpers\Context $context, mixed $object) : string
获取绑定值
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
mixed | $object | 绑定对象 |
query(\PG\MSF\Helpers\Context $context, callable $callback, integer|null $bindId = null, string|null $sql = null)
执行一个sql语句
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
callable | $callback | 执行完成后的回调函数 |
integer|null | $bindId | 绑定ID |
string|null | $sql | SQL语句 |
coroutineBegin(\PG\MSF\Helpers\Context $context, mixed $object) : \PG\MSF\Pools\MySql
开启一个协程事务
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
mixed | $object | 绑定对象 |
commit(\PG\MSF\Helpers\Context $context, string $callback, integer $id)
提交一个事务
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
string | $callback | 执行完成后的回调函数 |
integer | $id | 绑定ID |
coroutineCommit(\PG\MSF\Helpers\Context $context, integer $id) : \PG\MSF\Pools\MySql
协程Commit
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
integer | $id | 绑定ID |
rollback(\PG\MSF\Helpers\Context $context, callable $callback, integer $id)
回滚
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
callable | $callback | 执行完成后的回调函数 |
integer | $id | 绑定ID |
coroutineRollback(\PG\MSF\Helpers\Context $context, integer $id) : \PG\MSF\Pools\MySql
协程Rollback
\PG\MSF\Helpers\Context | $context | 请求上下文对象 |
integer | $id | 绑定ID |