<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension sqlite3@8.2.31

namespace {
class SQLite3 {

    // constants
    const OK = 0;
    const DENY = 1;
    const IGNORE = 2;
    const CREATE_INDEX = 1;
    const CREATE_TABLE = 2;
    const CREATE_TEMP_INDEX = 3;
    const CREATE_TEMP_TABLE = 4;
    const CREATE_TEMP_TRIGGER = 5;
    const CREATE_TEMP_VIEW = 6;
    const CREATE_TRIGGER = 7;
    const CREATE_VIEW = 8;
    const DELETE = 9;
    const DROP_INDEX = 10;
    const DROP_TABLE = 11;
    const DROP_TEMP_INDEX = 12;
    const DROP_TEMP_TABLE = 13;
    const DROP_TEMP_TRIGGER = 14;
    const DROP_TEMP_VIEW = 15;
    const DROP_TRIGGER = 16;
    const DROP_VIEW = 17;
    const INSERT = 18;
    const PRAGMA = 19;
    const READ = 20;
    const SELECT = 21;
    const TRANSACTION = 22;
    const UPDATE = 23;
    const ATTACH = 24;
    const DETACH = 25;
    const ALTER_TABLE = 26;
    const REINDEX = 27;
    const ANALYZE = 28;
    const CREATE_VTABLE = 29;
    const DROP_VTABLE = 30;
    const FUNCTION = 31;
    const SAVEPOINT = 32;
    const COPY = 0;
    const RECURSIVE = 33;

    // methods
    public function __construct(string $filename, int $flags = 6, string $encryptionKey = '') {}
    public function open(string $filename, int $flags = 6, string $encryptionKey = '') : void {}
    public function close() {}
    public static function version() : array {}
    public function lastInsertRowID() : int {}
    public function lastErrorCode() : int {}
    public function lastExtendedErrorCode() : int {}
    public function lastErrorMsg() : string {}
    public function changes() : int {}
    public function busyTimeout(int $milliseconds) : bool {}
    public function loadExtension(string $name) : bool {}
    public function backup(\SQLite3 $destination, string $sourceDatabase = 'main', string $destinationDatabase = 'main') : bool {}
    public static function escapeString(string $string) : string {}
    public function prepare(string $query) : \SQLite3Stmt|false {}
    public function exec(string $query) : bool {}
    public function query(string $query) : \SQLite3Result|false {}
    public function querySingle(string $query, bool $entireRow = false) : mixed {}
    public function createFunction(string $name, callable $callback, int $argCount = -1, int $flags = 0) : bool {}
    public function createAggregate(string $name, callable $stepCallback, callable $finalCallback, int $argCount = -1) : bool {}
    public function createCollation(string $name, callable $callback) : bool {}
    public function openBlob(string $table, string $column, int $rowid, string $database = 'main', int $flags = \SQLITE3_OPEN_READONLY) {}
    public function enableExceptions(bool $enable = false) : bool {}
    public function enableExtendedResultCodes(bool $enable = true) : bool {}
    public function setAuthorizer(?callable $callback) : bool {}
}

class SQLite3Result {

    // methods
    private function __construct() {}
    public function numColumns() : int {}
    public function columnName(int $column) : false|string {}
    public function columnType(int $column) : false|int {}
    public function fetchArray(int $mode = \SQLITE3_BOTH) : array|false {}
    public function reset() : bool {}
    public function finalize() {}
}

class SQLite3Stmt {

    // methods
    private function __construct(\SQLite3 $sqlite3, string $query) {}
    public function bindParam(int|string $param, mixed &$var, int $type = \SQLITE3_TEXT) : bool {}
    public function bindValue(int|string $param, mixed $value, int $type = \SQLITE3_TEXT) : bool {}
    public function clear() : bool {}
    public function close() : bool {}
    public function execute() : \SQLite3Result|false {}
    public function getSQL(bool $expand = false) : false|string {}
    public function paramCount() : int {}
    public function readOnly() : bool {}
    public function reset() : bool {}
}

const SQLITE3_ASSOC = 1;
const SQLITE3_BLOB = 4;
const SQLITE3_BOTH = 3;
const SQLITE3_DETERMINISTIC = 2048;
const SQLITE3_FLOAT = 2;
const SQLITE3_INTEGER = 1;
const SQLITE3_NULL = 5;
const SQLITE3_NUM = 2;
const SQLITE3_OPEN_CREATE = 4;
const SQLITE3_OPEN_READONLY = 1;
const SQLITE3_OPEN_READWRITE = 2;
const SQLITE3_TEXT = 3;
}
