2016-10-06 02:08:43 +00:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace JKingWeb\NewsSync\Db;
|
|
|
|
|
|
|
|
interface Statement {
|
2017-03-02 23:42:19 +00:00
|
|
|
const TS_TIME = -1;
|
|
|
|
const TS_DATE = 0;
|
|
|
|
const TS_BOTH = 1;
|
2017-03-02 19:19:16 +00:00
|
|
|
const TYPES = [
|
|
|
|
"null" => "null",
|
|
|
|
"nil" => "null",
|
|
|
|
"int" => "integer",
|
|
|
|
"integer" => "integer",
|
|
|
|
"float" => "float",
|
|
|
|
"double" => "float",
|
|
|
|
"real" => "float",
|
|
|
|
"numeric" => "float",
|
|
|
|
"date" => "date",
|
|
|
|
"time" => "time",
|
|
|
|
"datetime" => "datetime",
|
|
|
|
"timestamp" => "datetime",
|
|
|
|
"blob" => "binary",
|
|
|
|
"bin" => "binary",
|
|
|
|
"binary" => "binary",
|
2017-03-02 23:42:19 +00:00
|
|
|
"text" => "string",
|
|
|
|
"string" => "string",
|
|
|
|
"str" => "string",
|
2017-03-02 19:19:16 +00:00
|
|
|
"bool" => "boolean",
|
|
|
|
"boolean" => "boolean",
|
|
|
|
"bit" => "boolean",
|
|
|
|
];
|
|
|
|
|
2017-03-02 23:42:19 +00:00
|
|
|
static function dateFormat(int $part = self::TS_BOTH): string;
|
|
|
|
|
2017-03-02 04:12:42 +00:00
|
|
|
function run(...$values): Result;
|
|
|
|
function runArray(array $values): Result;
|
|
|
|
function rebind(...$bindings): bool;
|
|
|
|
function rebindArray(array $bindings): bool;
|
2016-10-06 02:08:43 +00:00
|
|
|
}
|