1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @strict-properties
7 * @not-serializable
8 */
9class PdoSqlite extends PDO
10{
11#ifdef SQLITE_DETERMINISTIC
12    /** @cvalue SQLITE_DETERMINISTIC */
13    public const int DETERMINISTIC = UNKNOWN;
14#endif
15
16    /** @cvalue SQLITE_OPEN_READONLY */
17    public const int OPEN_READONLY = UNKNOWN;
18
19    /** @cvalue SQLITE_OPEN_READWRITE */
20    public const int OPEN_READWRITE = UNKNOWN;
21
22    /** @cvalue SQLITE_OPEN_CREATE */
23    public const int OPEN_CREATE = UNKNOWN;
24
25    /** @cvalue PDO_SQLITE_ATTR_OPEN_FLAGS */
26    public const int ATTR_OPEN_FLAGS = UNKNOWN;
27
28    /** @cvalue PDO_SQLITE_ATTR_READONLY_STATEMENT */
29    public const int ATTR_READONLY_STATEMENT = UNKNOWN;
30
31    /** @cvalue PDO_SQLITE_ATTR_EXTENDED_RESULT_CODES */
32    public const int ATTR_EXTENDED_RESULT_CODES = UNKNOWN;
33
34    // Registers an aggregating User Defined Function for use in SQL statements
35    public function createAggregate(
36        string $name,
37        callable $step,
38        callable $finalize,
39        int $numArgs = -1
40    ): bool {}
41
42    // Registers a User Defined Function for use as a collating function in SQL statements
43    public function createCollation(string $name, callable $callback): bool {}
44
45    public function createFunction(
46        string $function_name,
47        callable $callback,
48        int $num_args = -1,
49        int $flags = 0
50    ): bool {}
51
52// PDO_SQLITE_OMIT_LOAD_EXTENSION might be defined by ext/pdo_sqlite/config.m4
53// if Sqlite3 did not have the sqlite3_load_extension function present
54// which can depend on how SQLite was compiled: https://www.sqlite.org/compile.html
55#ifndef PDO_SQLITE_OMIT_LOAD_EXTENSION
56    public function loadExtension(string $name): void {}
57#endif
58
59    /** @return resource|false */
60    public function openBlob(
61        string $table,
62        string $column,
63        int $rowid,
64        ?string $dbname = "main",
65        int $flags = PdoSqlite::OPEN_READONLY
66    ) {}
67}
68