1<?php 2 3/** @generate-class-entries */ 4 5/** 6 * @var int 7 * @cvalue PHP_SQLITE3_ASSOC 8 */ 9const SQLITE3_ASSOC = UNKNOWN; 10/** 11 * @var int 12 * @cvalue PHP_SQLITE3_NUM 13 */ 14const SQLITE3_NUM = UNKNOWN; 15/** 16 * @var int 17 * @cvalue PHP_SQLITE3_BOTH 18 */ 19const SQLITE3_BOTH = UNKNOWN; 20 21/** 22 * @var int 23 * @cvalue SQLITE_INTEGER 24 */ 25const SQLITE3_INTEGER = UNKNOWN; 26/** 27 * @var int 28 * @cvalue SQLITE_FLOAT 29 */ 30const SQLITE3_FLOAT = UNKNOWN; 31/** 32 * @var int 33 * @cvalue SQLITE3_TEXT 34 */ 35const SQLITE3_TEXT = UNKNOWN; 36/** 37 * @var int 38 * @cvalue SQLITE_BLOB 39 */ 40const SQLITE3_BLOB = UNKNOWN; 41/** 42 * @var int 43 * @cvalue SQLITE_NULL 44 */ 45const SQLITE3_NULL = UNKNOWN; 46 47/** 48 * @var int 49 * @cvalue SQLITE_OPEN_READONLY 50 */ 51const SQLITE3_OPEN_READONLY = UNKNOWN; 52/** 53 * @var int 54 * @cvalue SQLITE_OPEN_READWRITE 55 */ 56const SQLITE3_OPEN_READWRITE = UNKNOWN; 57/** 58 * @var int 59 * @cvalue SQLITE_OPEN_CREATE 60 */ 61const SQLITE3_OPEN_CREATE = UNKNOWN; 62 63#ifdef SQLITE_DETERMINISTIC 64/** 65 * @var int 66 * @cvalue SQLITE_DETERMINISTIC 67 */ 68const SQLITE3_DETERMINISTIC = UNKNOWN; 69#endif 70 71/** 72 * @strict-properties 73 */ 74class SQLite3Exception extends \Exception 75{ 76} 77 78/** @not-serializable */ 79class SQLite3 80{ 81 /** 82 * @cvalue SQLITE_OK 83 * @link sqlite3.class.constants.ok 84 */ 85 public const int OK = UNKNOWN; 86 87 /* Constants for authorizer return */ 88 89 /** 90 * @cvalue SQLITE_DENY 91 * @link sqlite3.class.constants.deny 92 */ 93 public const int DENY = UNKNOWN; 94 /** 95 * @cvalue SQLITE_IGNORE 96 * @link sqlite3.class.constants.ignore 97 */ 98 public const int IGNORE = UNKNOWN; 99 100 /* Constants for authorizer actions */ 101 102 /** 103 * @cvalue SQLITE_CREATE_INDEX 104 * @link sqlite3.class.constants.create-index 105 */ 106 public const int CREATE_INDEX = UNKNOWN; 107 /** 108 * @cvalue SQLITE_CREATE_TABLE 109 * @link sqlite3.class.constants.create-table 110 */ 111 public const int CREATE_TABLE = UNKNOWN; 112 /** 113 * @cvalue SQLITE_CREATE_TEMP_INDEX 114 * @link sqlite3.class.constants.create-temp-index 115 */ 116 public const int CREATE_TEMP_INDEX = UNKNOWN; 117 /** 118 * @cvalue SQLITE_CREATE_TEMP_TABLE 119 * @link sqlite3.class.constants.create-temp-table 120 */ 121 public const int CREATE_TEMP_TABLE = UNKNOWN; 122 /** 123 * @cvalue SQLITE_CREATE_TEMP_TRIGGER 124 * @link sqlite3.class.constants.create-temp-trigger 125 */ 126 public const int CREATE_TEMP_TRIGGER = UNKNOWN; 127 /** 128 * @cvalue SQLITE_CREATE_TEMP_VIEW 129 * @link sqlite3.class.constants.create-temp-view 130 */ 131 public const int CREATE_TEMP_VIEW = UNKNOWN; 132 /** 133 * @cvalue SQLITE_CREATE_TRIGGER 134 * @link sqlite3.class.constants.create-trigger 135 */ 136 public const int CREATE_TRIGGER = UNKNOWN; 137 /** 138 * @cvalue SQLITE_CREATE_VIEW 139 * @link sqlite3.class.constants.create-view 140 */ 141 public const int CREATE_VIEW = UNKNOWN; 142 /** 143 * @cvalue SQLITE_DELETE 144 * @link sqlite3.class.constants.delete 145 */ 146 public const int DELETE = UNKNOWN; 147 /** 148 * @cvalue SQLITE_DROP_INDEX 149 * @link sqlite3.class.constants.drop-index 150 */ 151 public const int DROP_INDEX = UNKNOWN; 152 /** 153 * @cvalue SQLITE_DROP_TABLE 154 * @link sqlite3.class.constants.drop-table 155 */ 156 public const int DROP_TABLE = UNKNOWN; 157 /** 158 * @cvalue SQLITE_DROP_TEMP_INDEX 159 * @link sqlite3.class.constants.drop-temp-index 160 */ 161 public const int DROP_TEMP_INDEX = UNKNOWN; 162 /** 163 * @cvalue SQLITE_DROP_TEMP_TABLE 164 * @link sqlite3.class.constants.drop-temp-table 165 */ 166 public const int DROP_TEMP_TABLE = UNKNOWN; 167 /** 168 * @cvalue SQLITE_DROP_TEMP_TRIGGER 169 * @link sqlite3.class.constants.drop-temp-trigger 170 */ 171 public const int DROP_TEMP_TRIGGER = UNKNOWN; 172 /** 173 * @cvalue SQLITE_DROP_TEMP_VIEW 174 * @link sqlite3.class.constants.drop-temp-view 175 */ 176 public const int DROP_TEMP_VIEW = UNKNOWN; 177 /** 178 * @cvalue SQLITE_DROP_TRIGGER 179 * @link sqlite3.class.constants.drop-trigger 180 */ 181 public const int DROP_TRIGGER = UNKNOWN; 182 /** 183 * @cvalue SQLITE_DROP_VIEW 184 * @link sqlite3.class.constants.drop-view 185 */ 186 public const int DROP_VIEW = UNKNOWN; 187 /** 188 * @cvalue SQLITE_INSERT 189 * @link sqlite3.class.constants.insert 190 */ 191 public const int INSERT = UNKNOWN; 192 /** 193 * @cvalue SQLITE_PRAGMA 194 * @link sqlite3.class.constants.pragma 195 */ 196 public const int PRAGMA = UNKNOWN; 197 /** 198 * @cvalue SQLITE_READ 199 * @link sqlite3.class.constants.read 200 */ 201 public const int READ = UNKNOWN; 202 /** 203 * @cvalue SQLITE_SELECT 204 * @link sqlite3.class.constants.select 205 */ 206 public const int SELECT = UNKNOWN; 207 /** 208 * @cvalue SQLITE_TRANSACTION 209 * @link sqlite3.class.constants.transaction 210 */ 211 public const int TRANSACTION = UNKNOWN; 212 /** 213 * @cvalue SQLITE_UPDATE 214 * @link sqlite3.class.constants.update 215 */ 216 public const int UPDATE = UNKNOWN; 217 /** 218 * @cvalue SQLITE_ATTACH 219 * @link sqlite3.class.constants.attach 220 */ 221 public const int ATTACH = UNKNOWN; 222 /** 223 * @cvalue SQLITE_DETACH 224 * @link sqlite3.class.constants.detach 225 */ 226 public const int DETACH = UNKNOWN; 227 /** 228 * @cvalue SQLITE_ALTER_TABLE 229 * @link sqlite3.class.constants.alter-table 230 */ 231 public const int ALTER_TABLE = UNKNOWN; 232 /** 233 * @cvalue SQLITE_REINDEX 234 * @link sqlite3.class.constants.reindex 235 */ 236 public const int REINDEX = UNKNOWN; 237 /** 238 * @cvalue SQLITE_ANALYZE 239 * @link sqlite3.class.constants.analyze 240 */ 241 public const int ANALYZE = UNKNOWN; 242 /** 243 * @cvalue SQLITE_CREATE_VTABLE 244 * @link sqlite3.class.constants.create-vtable 245 */ 246 public const int CREATE_VTABLE = UNKNOWN; 247 /** 248 * @cvalue SQLITE_DROP_VTABLE 249 * @link sqlite3.class.constants.drop-vtable 250 */ 251 public const int DROP_VTABLE = UNKNOWN; 252 /** 253 * @cvalue SQLITE_FUNCTION 254 * @link sqlite3.class.constants.function 255 */ 256 public const int FUNCTION = UNKNOWN; 257 /** 258 * @cvalue SQLITE_SAVEPOINT 259 * @link sqlite3.class.constants.savepoint 260 */ 261 public const int SAVEPOINT = UNKNOWN; 262 /** 263 * @cvalue SQLITE_COPY 264 * @link sqlite3.class.constants.copy 265 */ 266 public const int COPY = UNKNOWN; 267#ifdef SQLITE_RECURSIVE 268 /** 269 * @cvalue SQLITE_RECURSIVE 270 * @link sqlite3.class.constants.recursive 271 */ 272 public const int RECURSIVE = UNKNOWN; 273#endif 274 275 /** @implementation-alias SQLite3::open */ 276 public function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryptionKey = "") {} 277 278 /** 279 * @tentative-return-type 280 * @todo SQLite3::open should really be static 281 */ 282 public function open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryptionKey = ""): void {} 283 284 /** @tentative-return-type */ 285 public function close(): bool {} 286 287 /** @tentative-return-type */ 288 public static function version(): array {} 289 290 /** @tentative-return-type */ 291 public function lastInsertRowID(): int {} 292 293 /** @tentative-return-type */ 294 public function lastErrorCode(): int {} 295 296 /** @tentative-return-type */ 297 public function lastExtendedErrorCode(): int {} 298 299 /** @tentative-return-type */ 300 public function lastErrorMsg(): string {} 301 302 /** @tentative-return-type */ 303 public function changes(): int {} 304 305 /** @tentative-return-type */ 306 public function busyTimeout(int $milliseconds): bool {} 307 308#ifndef SQLITE_OMIT_LOAD_EXTENSION 309 /** @tentative-return-type */ 310 public function loadExtension(string $name): bool {} 311#endif 312 313#if SQLITE_VERSION_NUMBER >= 3006011 314 /** @tentative-return-type */ 315 public function backup(SQLite3 $destination, string $sourceDatabase = "main", string $destinationDatabase = "main"): bool {} 316#endif 317 318 /** @tentative-return-type */ 319 public static function escapeString(string $string): string {} 320 321 /** @tentative-return-type */ 322 public function prepare(string $query): SQLite3Stmt|false {} 323 324 /** @tentative-return-type */ 325 public function exec(string $query): bool {} 326 327 /** @tentative-return-type */ 328 public function query(string $query): SQLite3Result|false {} 329 330 /** @tentative-return-type */ 331 public function querySingle(string $query, bool $entireRow = false): mixed {} 332 333 /** @tentative-return-type */ 334 public function createFunction(string $name, callable $callback, int $argCount = -1, int $flags = 0): bool {} 335 336 /** @tentative-return-type */ 337 public function createAggregate(string $name, callable $stepCallback, callable $finalCallback, int $argCount = -1): bool {} 338 339 /** @tentative-return-type */ 340 public function createCollation(string $name, callable $callback): bool {} 341 342 /** @return resource|false */ 343 public function openBlob(string $table, string $column, int $rowid, string $database = "main", int $flags = SQLITE3_OPEN_READONLY) {} 344 345 /** @tentative-return-type */ 346 public function enableExceptions(bool $enable = false): bool {} 347 348 /** @tentative-return-type */ 349 public function enableExtendedResultCodes(bool $enable = true): bool {} 350 351 /** @tentative-return-type */ 352 public function setAuthorizer(?callable $callback): bool {} 353} 354 355/** @not-serializable */ 356class SQLite3Stmt 357{ 358 private function __construct(SQLite3 $sqlite3, string $query) {} 359 360 /** @tentative-return-type */ 361 public function bindParam(string|int $param, mixed &$var, int $type = SQLITE3_TEXT): bool {} 362 363 /** @tentative-return-type */ 364 public function bindValue(string|int $param, mixed $value, int $type = SQLITE3_TEXT): bool {} 365 366 /** @tentative-return-type */ 367 public function clear(): bool {} 368 369 /** @tentative-return-type */ 370 public function close(): true {} 371 372 /** @tentative-return-type */ 373 public function execute(): SQLite3Result|false {} 374 375 /** @tentative-return-type */ 376 public function getSQL(bool $expand = false): string|false {} 377 378 /** @tentative-return-type */ 379 public function paramCount(): int {} 380 381 /** @tentative-return-type */ 382 public function readOnly(): bool {} 383 384 /** @tentative-return-type */ 385 public function reset(): bool {} 386} 387 388/** @not-serializable */ 389class SQLite3Result 390{ 391 private function __construct() {} 392 393 /** @tentative-return-type */ 394 public function numColumns(): int {} 395 396 /** @tentative-return-type */ 397 public function columnName(int $column): string|false {} 398 399 /** @tentative-return-type */ 400 public function columnType(int $column): int|false {} 401 402 /** @tentative-return-type */ 403 public function fetchArray(int $mode = SQLITE3_BOTH): array|false {} 404 405 /** @tentative-return-type */ 406 public function reset(): bool {} 407 408 /** @tentative-return-type */ 409 public function finalize(): true {} 410} 411