Skip to content

Commit

Permalink
update to build 430
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc committed Dec 8, 2021
1 parent 176b690 commit a6f33ba
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 19 deletions.
5 changes: 5 additions & 0 deletions docs/update/build-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

同时此处将只使用 build 版本号进行区分。

## build 430 (2021-12-8)

- 删除调试信息
- 修复 #56 中关于数据库组件的 Bug

## build 429 (2021-12-7)

- 新增配置项 `onebot`.`message_command_policy`
Expand Down
7 changes: 7 additions & 0 deletions docs/update/v2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 更新日志(v2 版本)

# v2.6.3 (build 430)

> 更新时间:2021.12.8
- 删除调试信息
- 修复 #56 中关于数据库组件的 Bug

## v2.6.2 (build 429)

> 更新时间:2021.12.7
Expand Down
4 changes: 2 additions & 2 deletions src/ZM/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class ConsoleApplication extends Application
{
private static $obj = null;

const VERSION_ID = 429;
const VERSION = "2.6.2";
const VERSION_ID = 430;
const VERSION = "2.6.3";

/**
* @throws InitException
Expand Down
1 change: 0 additions & 1 deletion src/ZM/Module/QQBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ private function dispatchAfterEvents($data): EventDispatcher {
$after->setRuleFunction(function ($v) use ($data) {
return $v->cq_event == $data["post_type"];
});
zm_dump("开始触发!", $data);
$after->dispatchEvents($data);
return $after;
}
Expand Down
52 changes: 36 additions & 16 deletions src/ZM/MySQL/MySQLStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,23 @@ class MySQLStatement implements IteratorAggregate, Statement
/** @var PDOStatement|PDOStatementProxy */
private $statement;

public function __construct($obj) {
public function __construct($obj)
{
$this->statement = $obj;
}

public function closeCursor() {
public function closeCursor()
{
return $this->statement->closeCursor();
}

public function columnCount() {
public function columnCount()
{
return $this->statement->columnCount();
}

public function setFetchMode($fetchMode, $arg2 = null, $arg3 = []) {
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = [])
{
if ($arg2 !== null && $arg3 !== [])
return $this->statement->setFetchMode($fetchMode, $arg2, $arg3);
elseif ($arg2 !== null && $arg3 === [])
Expand All @@ -40,47 +44,63 @@ public function setFetchMode($fetchMode, $arg2 = null, $arg3 = []) {
return $this->statement->setFetchMode($fetchMode);
}

public function fetch($fetchMode = PDO::FETCH_ASSOC, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) {
public function fetch($fetchMode = PDO::FETCH_ASSOC, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
{
return $this->statement->fetch($fetchMode, $cursorOrientation, $cursorOffset);
}

public function fetchAll($fetchMode = PDO::FETCH_ASSOC, $fetchArgument = null, $ctorArgs = null) {
return $this->statement->fetchAll($fetchMode, $fetchArgument, $ctorArgs);
public function fetchAll($fetchMode = PDO::FETCH_ASSOC, $fetchArgument = null, $ctorArgs = null)
{
if ($fetchArgument === null && $ctorArgs === null)
return $this->statement->fetchAll($fetchMode);
elseif ($fetchArgument !== null && $ctorArgs === null)
return $this->statement->fetchAll($fetchMode, $fetchArgument);
else
return $this->statement->fetchAll($fetchMode, $fetchArgument, $ctorArgs);
}

public function fetchColumn($columnIndex = 0) {
public function fetchColumn($columnIndex = 0)
{
return $this->statement->fetchColumn($columnIndex);
}

public function bindValue($param, $value, $type = ParameterType::STRING) {
public function bindValue($param, $value, $type = ParameterType::STRING)
{
return $this->statement->bindValue($param, $value, $type);
}

public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) {
public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null)
{
return $this->statement->bindParam($param, $variable, $type, $length);
}

public function errorCode() {
public function errorCode()
{
return $this->statement->errorCode();
}

public function errorInfo() {
public function errorInfo()
{
return $this->statement->errorInfo();
}

public function execute($params = null) {
public function execute($params = null)
{
return $this->statement->execute($params);
}

public function rowCount() {
public function rowCount()
{
return $this->statement->rowCount();
}

public function getIterator() {
public function getIterator()
{
return new StatementIterator($this);
}

public function current() {
public function current()
{
return $this->statement->current();
}
}
Empty file modified zhamao
100644 → 100755
Empty file.

1 comment on commit a6f33ba

@crazywhalecc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#56

Please sign in to comment.