Debian Codegraph @

codelitephp/resources/cc/sqlite3.php

raw
1 <?php
2
3 // Start of sqlite3 v.0.7-dev
4
5 class SQLite3 {
6
7 /**
8 * Opens an SQLite database
9 * @link http://www.php.net/manual/en/sqlite3.open.php
10 * @param filename string <p>
11 * Path to the SQLite database, or :memory: to use in-memory database.
12 * </p>
13 * @param flags int[optional] <p>
14 * Optional flags used to determine how to open the SQLite database. By
15 * default, open uses SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE.
16 *
17 *
18 * <p>
19 * SQLITE3_OPEN_READONLY: Open the database for
20 * reading only.
21 * </p>
22 * @param encryption_key string[optional] <p>
23 * An optional encryption key used when encrypting and decrypting an
24 * SQLite database.
25 * </p>
26 * @return void
27 */
28 public function open ($filename, $flags = null, $encryption_key = null) {}
29
30 /**
31 * Closes the database connection
32 * @link http://www.php.net/manual/en/sqlite3.close.php
33 * @return bool true on success, false on failure.
34 */
35 public function close () {}
36
37 /**
38 * Executes a result-less query against a given database
39 * @link http://www.php.net/manual/en/sqlite3.exec.php
40 * @param query string <p>
41 * The SQL query to execute (typically an INSERT, UPDATE, or DELETE
42 * query).
43 * </p>
44 * @return bool true if the query succeeded, false on failure.
45 */
46 public function exec ($query) {}
47
48 /**
49 * Returns the SQLite3 library version as a string constant and as a number
50 * @link http://www.php.net/manual/en/sqlite3.version.php
51 * @return array an associative array with the keys "versionString" and
52 * "versionNumber".
53 */
54 public static function version () {}
55
56 /**
57 * Returns the row ID of the most recent INSERT into the database
58 * @link http://www.php.net/manual/en/sqlite3.lastinsertrowid.php
59 * @return int the row ID of the most recent INSERT into the database
60 */
61 public function lastInsertRowID () {}
62
63 /**
64 * Returns the numeric result code of the most recent failed SQLite request
65 * @link http://www.php.net/manual/en/sqlite3.lasterrorcode.php
66 * @return int an integer value representing the numeric result code of the most
67 * recent failed SQLite request.
68 */
69 public function lastErrorCode () {}
70
71 /**
72 * Returns English text describing the most recent failed SQLite request
73 * @link http://www.php.net/manual/en/sqlite3.lasterrormsg.php
74 * @return string an English string describing the most recent failed SQLite request.
75 */
76 public function lastErrorMsg () {}
77
78 /**
79 * Sets the busy connection handler
80 * @link http://www.php.net/manual/en/sqlite3.busytimeout.php
81 * @param msecs int <p>
82 * The milliseconds to sleep. Setting this value to a value less than
83 * or equal to zero, will turn off an already set timeout handler.
84 * </p>
85 * @return bool true on success, false on failure.
86 */
87 public function busyTimeout ($msecs) {}
88
89 /**
90 * Attempts to load an SQLite extension library
91 * @link http://www.php.net/manual/en/sqlite3.loadextension.php
92 * @param shared_library string <p>
93 * The name of the library to load. The library must be located in the
94 * directory specified in the configure option sqlite3.extension_dir.
95 * </p>
96 * @return bool true if the extension is successfully loaded, false on failure.
97 */
98 public function loadExtension ($shared_library) {}
99
100 /**
101 * Returns the number of database rows that were changed (or inserted or
102 deleted) by the most recent SQL statement
103 * @link http://www.php.net/manual/en/sqlite3.changes.php
104 * @return int an integer value corresponding to the number of
105 * database rows changed (or inserted or deleted) by the most recent SQL
106 * statement.
107 */
108 public function changes () {}
109
110 /**
111 * Returns a string that has been properly escaped
112 * @link http://www.php.net/manual/en/sqlite3.escapestring.php
113 * @param value string <p>
114 * The string to be escaped.
115 * </p>
116 * @return string a properly escaped string that may be used safely in an SQL
117 * statement.
118 */
119 public static function escapeString ($value) {}
120
121 /**
122 * Prepares an SQL statement for execution
123 * @link http://www.php.net/manual/en/sqlite3.prepare.php
124 * @param query string <p>
125 * The SQL query to prepare.
126 * </p>
127 * @return SQLite3Stmt an SQLite3Stmt object on success&return.falseforfailure;.
128 */
129 public function prepare ($query) {}
130
131 /**
132 * Executes an SQL query
133 * @link http://www.php.net/manual/en/sqlite3.query.php
134 * @param query string <p>
135 * The SQL query to execute.
136 * </p>
137 * @return SQLite3Result an SQLite3Result object if the query returns results. Otherwise,
138 * returns true if the query succeeded, false on failure.
139 */
140 public function query ($query) {}
141
142 /**
143 * Executes a query and returns a single result
144 * @link http://www.php.net/manual/en/sqlite3.querysingle.php
145 * @param query string <p>
146 * The SQL query to execute.
147 * </p>
148 * @param entire_row bool[optional] <p>
149 * By default, querySingle returns the value of the
150 * first column returned by the query. If
151 * entire_row is true, then it returns an array
152 * of the entire first row.
153 * </p>
154 * @return mixed the value of the first column of results or an array of the entire
155 * first row (if entire_row is true).
156 * </p>
157 * <p>
158 * If the query is valid but no results are returned, then &null; will be
159 * returned if entire_row is false, otherwise an
160 * empty array is returned.
161 * </p>
162 * <p>
163 * Invalid or failing queries will return false.
164 */
165 public function querySingle ($query, $entire_row = null) {}
166
167 /**
168 * Registers a PHP function for use as an SQL scalar function
169 * @link http://www.php.net/manual/en/sqlite3.createfunction.php
170 * @param name string <p>
171 * Name of the SQL function to be created or redefined.
172 * </p>
173 * @param callback mixed <p>
174 * The name of a PHP function or user-defined function to apply as a
175 * callback, defining the behavior of the SQL function.
176 * </p>
177 * @param argument_count int[optional] <p>
178 * The number of arguments that the SQL function takes. If
179 * this parameter is negative, then the SQL function may take
180 * any number of arguments.
181 * </p>
182 * @return bool true upon successful creation of the function, false on failure.
183 */
184 public function createFunction ($name, $callback, $argument_count = null) {}
185
186 /**
187 * Registers a PHP function for use as an SQL aggregate function
188 * @link http://www.php.net/manual/en/sqlite3.createaggregate.php
189 * @param name string <p>
190 * Name of the SQL aggregate to be created or redefined.
191 * </p>
192 * @param step_callback mixed <p>
193 * The name of a PHP function or user-defined function to apply as a
194 * callback for every item in the aggregate.
195 * </p>
196 * @param final_callback mixed <p>
197 * The name of a PHP function or user-defined function to apply as a
198 * callback at the end of the aggregate data.
199 * </p>
200 * @param argument_count int[optional] <p>
201 * The number of arguments that the SQL aggregate takes. If
202 * this parameter is negative, then the SQL aggregate may take
203 * any number of arguments.
204 * </p>
205 * @return bool true upon successful creation of the aggregate, false on
206 * failure.
207 */
208 public function createAggregate ($name, $step_callback, $final_callback, $argument_count = null) {}
209
210 /**
211 * Registers a PHP function for use as an SQL collating function
212 * @link http://www.php.net/manual/en/sqlite3.createcollation.php
213 * @param name string <p>
214 * Name of the SQL collating function to be created or redefined
215 * </p>
216 * @param callback callable <p>
217 * The name of a PHP function or user-defined function to apply as a
218 * callback, defining the behavior of the collation. It should accept two
219 * strings and return as strcmp does, i.e. it should
220 * return -1, 1, or 0 if the first string sorts before, sorts after, or is
221 * equal to the second.
222 * </p>
223 * @return bool Returns true on success, false on failure.
224 */
225 public function createCollation ($name, $callback) {}
226
227 /**
228 * @param table
229 * @param column
230 * @param rowid
231 * @param dbname[optional]
232 */
233 public function openBlob ($table, $column, $rowid, $dbname) {}
234
235 /**
236 * @param enableExceptions
237 */
238 public function enableExceptions ($enableExceptions) {}
239
240 /**
241 * Instantiates an SQLite3 object and opens an SQLite 3 database
242 * @link http://www.php.net/manual/en/sqlite3.construct.php
243 * @param filename
244 * @param flags
245 * @param encryption_key
246 */
247 public function __construct ($filename, $flags, $encryption_key) {}
248
249 }
250
251 class SQLite3Stmt {
252
253 /**
254 * Returns the number of parameters within the prepared statement
255 * @link http://www.php.net/manual/en/sqlite3stmt.paramcount.php
256 * @return int the number of parameters within the prepared statement.
257 */
258 public function paramCount () {}
259
260 /**
261 * Closes the prepared statement
262 * @link http://www.php.net/manual/en/sqlite3stmt.close.php
263 * @return bool true
264 */
265 public function close () {}
266
267 /**
268 * Resets the prepared statement
269 * @link http://www.php.net/manual/en/sqlite3stmt.reset.php
270 * @return bool true if the statement is successfully reset, false on failure.
271 */
272 public function reset () {}
273
274 /**
275 * Clears all current bound parameters
276 * @link http://www.php.net/manual/en/sqlite3stmt.clear.php
277 * @return bool true on successful clearing of bound parameters, false on
278 * failure.
279 */
280 public function clear () {}
281
282 /**
283 * Executes a prepared statement and returns a result set object
284 * @link http://www.php.net/manual/en/sqlite3stmt.execute.php
285 * @return SQLite3Result an SQLite3Result object on successful execution of the prepared
286 * statement, false on failure.
287 */
288 public function execute () {}
289
290 /**
291 * Binds a parameter to a statement variable
292 * @link http://www.php.net/manual/en/sqlite3stmt.bindparam.php
293 * @param sql_param string <p>
294 * An string identifying the statement variable to which the
295 * parameter should be bound.
296 * </p>
297 * @param param mixed <p>
298 * The parameter to bind to a statement variable.
299 * </p>
300 * @param type int[optional] <p>
301 * The data type of the parameter to bind.
302 *
303 *
304 * <p>
305 * SQLITE3_INTEGER: The value is a signed integer,
306 * stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of
307 * the value.
308 * </p>
309 * @return bool true if the parameter is bound to the statement variable, false
310 * on failure.
311 */
312 public function bindParam ($sql_param, &$param, $type = null) {}
313
314 /**
315 * Binds the value of a parameter to a statement variable
316 * @link http://www.php.net/manual/en/sqlite3stmt.bindvalue.php
317 * @param sql_param string <p>
318 * An string identifying the statement variable to which the
319 * value should be bound.
320 * </p>
321 * @param value mixed <p>
322 * The value to bind to a statement variable.
323 * </p>
324 * @param type int[optional] <p>
325 * The data type of the value to bind.
326 *
327 *
328 * <p>
329 * SQLITE3_INTEGER: The value is a signed integer,
330 * stored in 1, 2, 3, 4, 6, or 8 bytes depending on the magnitude of
331 * the value.
332 * </p>
333 * @return bool true if the value is bound to the statement variable, false
334 * on failure.
335 */
336 public function bindValue ($sql_param, $value, $type = null) {}
337
338 public function readOnly () {}
339
340 /**
341 * @param sqlite3
342 */
343 private function __construct ($sqlite3) {}
344
345 }
346
347 class SQLite3Result {
348
349 /**
350 * Returns the number of columns in the result set
351 * @link http://www.php.net/manual/en/sqlite3result.numcolumns.php
352 * @return int the number of columns in the result set.
353 */
354 public function numColumns () {}
355
356 /**
357 * Returns the name of the nth column
358 * @link http://www.php.net/manual/en/sqlite3result.columnname.php
359 * @param column_number int <p>
360 * The numeric zero-based index of the column.
361 * </p>
362 * @return string the string name of the column identified by
363 * column_number.
364 */
365 public function columnName ($column_number) {}
366
367 /**
368 * Returns the type of the nth column
369 * @link http://www.php.net/manual/en/sqlite3result.columntype.php
370 * @param column_number int <p>
371 * The numeric zero-based index of the column.
372 * </p>
373 * @return int the data type index of the column identified by
374 * column_number (one of
375 * SQLITE3_INTEGER, SQLITE3_FLOAT,
376 * SQLITE3_TEXT, SQLITE3_BLOB, or
377 * SQLITE3_NULL).
378 */
379 public function columnType ($column_number) {}
380
381 /**
382 * Fetches a result row as an associative or numerically indexed array or both
383 * @link http://www.php.net/manual/en/sqlite3result.fetcharray.php
384 * @param mode int[optional] <p>
385 * Controls how the next row will be returned to the caller. This value
386 * must be one of either SQLITE3_ASSOC,
387 * SQLITE3_NUM, or SQLITE3_BOTH.
388 *
389 *
390 * <p>
391 * SQLITE3_ASSOC: returns an array indexed by column
392 * name as returned in the corresponding result set
393 * </p>
394 * @return array a result row as an associatively or numerically indexed array or
395 * both. Alternately will return false if there are no more rows.
396 */
397 public function fetchArray ($mode = null) {}
398
399 /**
400 * Resets the result set back to the first row
401 * @link http://www.php.net/manual/en/sqlite3result.reset.php
402 * @return bool true if the result set is successfully reset
403 * back to the first row, false on failure.
404 */
405 public function reset () {}
406
407 /**
408 * Closes the result set
409 * @link http://www.php.net/manual/en/sqlite3result.finalize.php
410 * @return bool true.
411 */
412 public function finalize () {}
413
414 private function __construct () {}
415
416 }
417
418 /**
419 * Specifies that the Sqlite3Result::fetchArray
420 * method shall return an array indexed by column name as returned in the
421 * corresponding result set.
422 * @link http://www.php.net/manual/en/sqlite3.constants.php
423 */
424 define ('SQLITE3_ASSOC', 1);
425
426 /**
427 * Specifies that the Sqlite3Result::fetchArray
428 * method shall return an array indexed by column number as returned in the
429 * corresponding result set, starting at column 0.
430 * @link http://www.php.net/manual/en/sqlite3.constants.php
431 */
432 define ('SQLITE3_NUM', 2);
433
434 /**
435 * Specifies that the Sqlite3Result::fetchArray
436 * method shall return an array indexed by both column name and number as
437 * returned in the corresponding result set, starting at column 0.
438 * @link http://www.php.net/manual/en/sqlite3.constants.php
439 */
440 define ('SQLITE3_BOTH', 3);
441
442 /**
443 * Represents the SQLite3 INTEGER storage class.
444 * @link http://www.php.net/manual/en/sqlite3.constants.php
445 */
446 define ('SQLITE3_INTEGER', 1);
447
448 /**
449 * Represents the SQLite3 REAL (FLOAT) storage class.
450 * @link http://www.php.net/manual/en/sqlite3.constants.php
451 */
452 define ('SQLITE3_FLOAT', 2);
453
454 /**
455 * Represents the SQLite3 TEXT storage class.
456 * @link http://www.php.net/manual/en/sqlite3.constants.php
457 */
458 define ('SQLITE3_TEXT', 3);
459
460 /**
461 * Represents the SQLite3 BLOB storage class.
462 * @link http://www.php.net/manual/en/sqlite3.constants.php
463 */
464 define ('SQLITE3_BLOB', 4);
465
466 /**
467 * Represents the SQLite3 NULL storage class.
468 * @link http://www.php.net/manual/en/sqlite3.constants.php
469 */
470 define ('SQLITE3_NULL', 5);
471
472 /**
473 * Specifies that the SQLite3 database be opened for reading only.
474 * @link http://www.php.net/manual/en/sqlite3.constants.php
475 */
476 define ('SQLITE3_OPEN_READONLY', 1);
477
478 /**
479 * Specifies that the SQLite3 database be opened for reading and writing.
480 * @link http://www.php.net/manual/en/sqlite3.constants.php
481 */
482 define ('SQLITE3_OPEN_READWRITE', 2);
483
484 /**
485 * Specifies that the SQLite3 database be created if it does not already
486 * exist.
487 * @link http://www.php.net/manual/en/sqlite3.constants.php
488 */
489 define ('SQLITE3_OPEN_CREATE', 4);
490
491 // End of sqlite3 v.0.7-dev
492 ?>