summaryrefslogtreecommitdiff
path: root/ext/sqlite3/sqlite3.stub.php
blob: ede86d09273019ad30562348d150d854a143efc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php

class SQLite3
{
    function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {}

    /** @return void */
    function open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = '') {}

    /** @return bool */
    function close() {}

    /** @return array */
    function version() {}

    /** @return int */
    function lastInsertRowID() {}

    /** @return int */
    function lastErrorCode() {}

    /** @return int */
    function lastExtendedErrorCode() {}

    /** @return string */
    function lastErrorMsg() {}

    /** @return int */
    function changes() {}

    /** @return bool */
    function busyTimeout(int $ms) {}

#ifndef SQLITE_OMIT_LOAD_EXTENSION
    /** @return bool */
    function loadExtension(string $shared_library) {}
#endif

#if SQLITE_VERSION_NUMBER >= 3006011
    /** @return bool */
    function backup(SQLite3 $destination_db, string $source_dbname = "main", string $destination_dbname = "main") {}
#endif

    /** @return string */
    function escapeString(string $value) {}

    /** @return SQLite3Stmt|false */
    function prepare(string $query) {}

    /** @return SQLite3Result|false|null */
    function query(string $query) {}

    /** @return mixed */
    function querySingle(string $query, bool $entire_row = false) {}

    /** @return bool */
    function createFunction(string $name, $callback, int $argument_count = -1, int $flags = 0) {}

    /** @return bool */
    function createAggregate(string $name, $step_callback, $final_callback, int $argument_count = -1) {}

    /** @return bool */
    function createCollation(string $name, $callback) {}

    /** @return resource|false */
    function openBlob(string $table, string $column, int $rowid, string $dbname = "main", int $flags = SQLITE3_OPEN_READONLY) {}

    /** @return bool */
    function enableExceptions(bool $enableExceptions = false) {}

    /** @return bool */
    function enableExtendedResultCodes(bool $enable = true) {}
}

class SQLite3Stmt
{
    function __construct(SQLite3 $sqlite3, string $sql) {}

    /** @return bool */
    function bindParam($param_number, &$param, int $type = UNKNOWN) {}

    /** @return bool */
    function bindValue($param_number, $param, int $type = UNKNOWN) {}

    /** @return bool */
    function clear() {}

    /** @return bool */
    function close() {}

    /** @return SQLite3Result|false */
    function execute() {}

    /** @return string|false */
    function getSQL(bool $expanded = false) {}

    /** @return int */
    function paramCount() {}

    /** @return bool */
    function readOnly() {}

    /** @return bool */
    function reset() {}
}

class SQLite3Result
{
    function __construct() {}

    /** @return int */
    function numColumns() {}

    /** @return string|false */
    function columnName(int $column_number) {}

    /** @return int|false */
    function columnType(int $column_number) {}

    /** @return array|false */
    function fetchArray(int $mode = SQLITE3_BOTH) {}

    /** @return bool */
    function reset() {}

    /** @return bool */
    function finalize() {}
}