1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00
Arsse/lib/Db/Statement.php

60 lines
2.5 KiB
PHP
Raw Permalink Normal View History

<?php
/** @license MIT
* Copyright 2017 J. King, Dustin Wilson et al.
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
2021-04-14 15:17:01 +00:00
2017-03-28 04:12:12 +00:00
namespace JKingWeb\Arsse\Db;
interface Statement {
2020-03-01 23:32:01 +00:00
public const TYPES = [
'int' => self::T_INTEGER,
'integer' => self::T_INTEGER,
'float' => self::T_FLOAT,
'double' => self::T_FLOAT,
'real' => self::T_FLOAT,
'numeric' => self::T_FLOAT,
'datetime' => self::T_DATETIME,
'timestamp' => self::T_DATETIME,
'blob' => self::T_BINARY,
'bin' => self::T_BINARY,
'binary' => self::T_BINARY,
'text' => self::T_STRING,
'string' => self::T_STRING,
'str' => self::T_STRING,
'bool' => self::T_BOOLEAN,
'boolean' => self::T_BOOLEAN,
2019-05-02 02:52:20 +00:00
'bit' => self::T_BOOLEAN,
'strict int' => self::T_NOT_NULL + self::T_INTEGER,
'strict integer' => self::T_NOT_NULL + self::T_INTEGER,
'strict float' => self::T_NOT_NULL + self::T_FLOAT,
'strict double' => self::T_NOT_NULL + self::T_FLOAT,
'strict real' => self::T_NOT_NULL + self::T_FLOAT,
'strict numeric' => self::T_NOT_NULL + self::T_FLOAT,
'strict datetime' => self::T_NOT_NULL + self::T_DATETIME,
'strict timestamp' => self::T_NOT_NULL + self::T_DATETIME,
'strict blob' => self::T_NOT_NULL + self::T_BINARY,
'strict bin' => self::T_NOT_NULL + self::T_BINARY,
'strict binary' => self::T_NOT_NULL + self::T_BINARY,
'strict text' => self::T_NOT_NULL + self::T_STRING,
'strict string' => self::T_NOT_NULL + self::T_STRING,
'strict str' => self::T_NOT_NULL + self::T_STRING,
'strict bool' => self::T_NOT_NULL + self::T_BOOLEAN,
'strict boolean' => self::T_NOT_NULL + self::T_BOOLEAN,
'strict bit' => self::T_NOT_NULL + self::T_BOOLEAN,
];
2020-03-01 23:32:01 +00:00
public const T_INTEGER = 1;
public const T_STRING = 2;
public const T_BOOLEAN = 3;
public const T_DATETIME = 4;
public const T_FLOAT = 5;
public const T_BINARY = 6;
public const T_NOT_NULL = 100;
2017-08-29 14:50:31 +00:00
public function run(...$values): Result;
public function runArray(array $values = []): Result;
public function retype(...$bindings): bool;
public function retypeArray(array $bindings): bool;
2017-08-29 14:50:31 +00:00
}