forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSQLite.php
1398 lines (1277 loc) · 53.5 KB
/
SQLite.php
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Start of SQLite v.2.0-dev
/**
* @link http://php.net/manual/en/ref.sqlite.php
*/
class SQLiteDatabase {
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* @link http://php.net/manual/en/function.sqlite-open.php
* @param $filename <p>The filename of the SQLite database. If the file does not exist, SQLite will attempt to create it. PHP must have write permissions to the file if data is inserted, the database schema is modified or to create the database if it does not exist.</p>
* @param $mode [optional] <p>The mode of the file. Intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value.</p>
* @param $error_message [optional] <p>Passed by reference and is set to hold a descriptive error message explaining why the database could not be opened if there was an error.</p>
*/
final public function __construct ($filename, $mode = 0666, &$error_message) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* @link http://php.net/manual/en/function.sqlite-query.php
* @param $query <p>
* The query to be executed.
* </p>
* <p>
* Data inside the query should be {@link http://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
* </p>
* @param $result_type [optional]
* <p>The optional <i>result_type</i> parameter accepts a constant and determines how the returned array will be indexed. Using <b>SQLITE_ASSOC</b> will return only associative indices (named fields) while <b>SQLITE_NUM</b> will return only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b> will return both associative and numerical indices. <b>SQLITE_BOTH</b> is the default for this function.</p>
* @param $error_message [optional] <p>The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the {@see sqlite_last_error()} function.</p>
* @return resource|bool <p>
* This function will return a result handle or <b>FALSE</b> on failure.
* For queries that return rows, the result handle can then be used with
* functions such as {@see sqlite_fetch_array()} and
* {@see sqlite_seek()}.
* </p>
* <p>
* Regardless of the query type, this function will return <b>FALSE</b> if the
* query failed.
* </p>
* <p>
* {@see sqlite_query()} returns a buffered, seekable result
* handle. This is useful for reasonably small queries where you need to
* be able to randomly access the rows. Buffered result handles will
* allocate memory to hold the entire result and will not return until it
* has been fetched. If you only need sequential access to the data, it is
* recommended that you use the much higher performance
* {@see sqlite_unbuffered_query()} instead.
* </p>
*/
public function query ($query, $result_type, &$error_message) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* @link http://php.net/manual/en/function.sqlite-exec.php
* @param string $query <p>
* The query to be executed.
* </p>
* <p>
* Data inside the query should be {@link http://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
* </p>
* @param string $error_message [optional] <p>The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the
* {@see sqlite_last_error()} function.</p>
* @return boolean <p>
* This function will return a boolean result; <b>TRUE</b> for success or <b>FALSE</b> for failure.
* If you need to run a query that returns rows, see {@see sqlite_query()}.
* </p>
* <p>The column names returned by
* <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
* case-folded according to the value of the
* {@see sqlite.assoc_case} configuration
* option.</p>
*/
public function queryExec ($query, &$error_message) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Execute a query against a given database and returns an array
* @link http://php.net/manual/en/function.sqlite-array-query.php
* @param $query <p>
* The query to be executed.
* </p>
* <p>
* Data inside the query should be {@link http://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
* </p>
* @param $result_type [optional] <p>The optional <i>result_type</i>
* parameter accepts a constant and determines how the returned array will be
* indexed. Using <b>SQLITE_ASSOC</b> will return only associative
* indices (named fields) while <b>SQLITE_NUM</b> will return
* only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
* will return both associative and numerical indices.
* <b>SQLITE_BOTH</b> is the default for this function.</p>
* @param $decode_binary [optional] <p>When the <i>decode_binary</i>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
* {@see sqlite_escape_string()}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* <p>
* Returns an array of the entire result set; <b>FALSE</b> otherwise.
* </p>
* <p>The column names returned by
* <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
* case-folded according to the value of the
* {@link http://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
* option.</p>
*/
public function arrayQuery ($query, $result_type, $decode_binary) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.1)
* Executes a query and returns either an array for one single column or the value of the first row
* @link http://php.net/manual/en/function.sqlite-single-query.php
* @param string $query
* @param bool $first_row_only [optional]
* @param bool $decode_binary [optional]
* @return array
*/
public function singleQuery ($query, $first_row_only, $decode_binary) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Execute a query that does not prefetch and buffer all data
* @link http://php.net/manual/en/function.sqlite-unbuffered-query.php
* @param $query <p>
* The query to be executed.
* </p>
* <p>
* Data inside the query should be {@link http://php.net/manual/en/function.sqlite-escape-string.php properly escaped}.
* </p>
* @param $result_type [optional] <p>The optional <i>result_type</i> parameter accepts a constant and determines how the returned array will be indexed.
* Using <b>SQLITE_ASSOC</b> will return only associative indices (named fields) while <b>SQLITE_NUM</b> will return only numerical indices (ordinal field numbers).
* <b>SQLITE_BOTH</b> will return both associative and numerical indices. <b>SQLITE_BOTH</b> is the default for this function.
* @param $error_message [optional]
* @return resource Returns a result handle or <b>FALSE</b> on failure.
* {@see sqlite_unbuffered_query()} returns a sequential forward-only result set that can only be used to read each row, one after the other.
*/
public function unbufferedQuery ($query, $result_type = SQLITE_BOTH, &$error_message) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Returns the rowid of the most recently inserted row
* @link http://php.net/manual/en/function.sqlite-last-insert-rowid.php
* @return int Returns the row id, as an integer.
*/
public function lastInsertRowid () {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Returns the number of rows that were changed by the most recent SQL statement
* @link http://php.net/manual/en/function.sqlite-changes.php
* @return int Returns the number of changed rows.
*/
public function changes () {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Register an aggregating UDF for use in SQL statements
* @link http://php.net/manual/en/function.sqlite-create-aggregate.php
* @param $function_name <p>The name of the function used in SQL statements.</p>
* @param $step_func <p>Callback function called for each row of the result set. Function parameters are &$context, $value, ....</p>
* @param $finalize_func <p>Callback function to aggregate the "stepped" data from each row. Function parameter is &$context and the function should return the final result of aggregation.</p>
* @param $num_args [optional] <p>Hint to the SQLite parser if the callback function accepts a predetermined number of arguments.</p>
*/
public function createAggregate ($function_name, $step_func, $finalize_func, $num_args = -1) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Registers a "regular" User Defined Function for use in SQL statements
* @link http://php.net/manual/en/function.sqlite-create-function.php
* @param $function_name <p>The name of the function used in SQL statements.</p>
* @param $callback <p>
* Callback function to handle the defined SQL function.
* </p>
* <blockquote><p><b>Note</b>:
* Callback functions should return a type understood by SQLite (i.e.
* {@link http://php.net/manual/en/language.types.intro.php scalar type}).
* </p></blockquote>
* @param $num_args [optional] <blockquote><p><b>Note</b>: Two alternative syntaxes are
* supported for compatibility with other database extensions (such as MySQL).
* The preferred form is the first, where the <i>dbhandle</i>
* parameter is the first parameter to the function.</p></blockquote>
*/
public function createFunction ($function_name, $callback, $num_args = -1) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Set busy timeout duration, or disable busy handlers
* @link http://php.net/manual/en/function.sqlite-busy-timeout.php
* @param $milliseconds <p> The number of milliseconds. When set to 0, busy handlers will be disabled and SQLite will return immediately with a <b>SQLITE_BUSY</b> status code if another process/thread has the database locked for an update.
* PHP sets the default busy timeout to be 60 seconds when the database is opened.</p>
* @return int <p>Returns an error code, or 0 if no error occurred.</p>
*/
public function busyTimeout ($milliseconds) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Returns the error code of the last error for a database
* @link http://php.net/manual/en/function.sqlite-last-error.php
* @return int Returns an error code, or 0 if no error occurred.
*/
public function lastError () {}
/**
* (PHP 5 < 5.4.0)
* Return an array of column types from a particular table
* @link http://php.net/manual/en/function.sqlite-fetch-column-types.php
* @param $table_name <p>The table name to query.</p>
* @param $result_type [optional] <p>
* The optional <i>result_type</i> parameter accepts a
* constant and determines how the returned array will be indexed. Using
* <b>SQLITE_ASSOC</b> will return only associative indices
* (named fields) while <b>SQLITE_NUM</b> will return only
* numerical indices (ordinal field numbers).
* <b>SQLITE_ASSOC</b> is the default for
* this function.
* </p>
* @return array <p>
* Returns an array of column data types; <b>FALSE</b> on error.
* </p>
* <p>The column names returned by
* <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
* case-folded according to the value of the
* {@link http://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
* option.</p>
*/
public function fetchColumnTypes ($table_name, $result_type = SQLITE_ASSOC) {}
}
/**
* @link http://php.net/manual/en/ref.sqlite.php
*/
final class SQLiteResult implements Iterator, Traversable, Countable {
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Fetches the next row from a result set as an array
* @link http://php.net/manual/en/function.sqlite-fetch-array.php
* @param $result_type [optional]
* <p>
* The optional <i>result_type</i>
* parameter accepts a constant and determines how the returned array will be
* indexed. Using <b>SQLITE_ASSOC</b> will return only associative
* indices (named fields) while <b>SQLITE_NUM</b> will return
* only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
* will return both associative and numerical indices.
* <b>SQLITE_BOTH</b> is the default for this function.
* @param $decode_binary [optional] <p>When the <i>decode_binary</i>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
*{@link http://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* @return array <p>
* Returns an array of the next row from a result set; <b>FALSE</b> if the
* next position is beyond the final row.
* </p>
* <p>The column names returned by
* <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
* case-folded according to the value of the
* {@link http://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
* option.</p>
*/
public function fetch ($result_type = SQLITE_BOTH, $decode_binary = true) {}
/**
* (PHP 5 < 5.4.0)
* Fetches the next row from a result set as an object
* @link http://php.net/manual/en/function.sqlite-fetch-object.php
* @param string $class_name [optional]
* @param array $ctor_params [optional]
* @param bool $decode_binary [optional]
* @return object
*/
public function fetchObject ($class_name, $ctor_params, $decode_binary = true) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.1)
* Fetches the first column of a result set as a string
* @link http://php.net/manual/en/function.sqlite-fetch-single.php
* @param bool $decode_binary [optional]
* @return string <p>Returns the first column value, as a string.</p>
*/
public function fetchSingle ($decode_binary = true) {}
/**
* (PHP 5 < 5.4.0)
* Fetches the next row from a result set as an object
* @link http://php.net/manual/en/function.sqlite-fetch-object.php
* @param resource $result_type [optional]
* @param array $ctor_params [optional]
* @param bool $decode_binary [optional]
* @return object
*/
public function fetchAll ($result_type, array $ctor_params, $decode_binary = true) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Fetches a column from the current row of a result set
* @link http://php.net/manual/en/function.sqlite-column.php
* @param $index_or_name
* @param $decode_binary [optional] <p>When the <i>decode_binary</i>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
* {@see sqlite_escape_string()}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* @return mixed <p>Returns the column value</p>
*/
public function column ($index_or_name, $decode_binary = true) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Returns the number of fields in a result set
* @link http://php.net/manual/en/function.sqlite-num-fields.php
* @return int <p>Returns the number of fields, as an integer.</p>
*/
public function numFields () {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Returns the name of a particular field
* @link http://php.net/manual/en/function.sqlite-field-name.php
* @param $field_index <p>The ordinal column number in the result set.</p>
* @return string <p>
* Returns the name of a field in an SQLite result set, given the ordinal
* column number; <b>FALSE</b> on error.
* </p>
* <p>The column names returned by
* <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
* case-folded according to the value of the
* {@link http://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}configuration
* option.</p>
*
*/
public function fieldName ($field_index) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Fetches the current row from a result set as an array
* @link http://php.net/manual/en/function.sqlite-current.php
* @param $result_type [optional] <p>The optional <i>result_type</i>
* parameter accepts a constant and determines how the returned array will be
* indexed. Using <b>SQLITE_ASSOC</b> will return only associative
* indices (named fields) while <b>SQLITE_NUM</b> will return
* only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
* will return both associative and numerical indices.
* <b>SQLITE_BOTH</b> is the default for this function.</p>
* @param $decode_binary [optional] <p>When the <i>decode_binary</i>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
* {@see sqlite_escape_string()}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* @return array <p>
* Returns an array of the current row from a result set; <b>FALSE</b> if the
* current position is beyond the final row.
* </p>
* <p>The column names returned by
* <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
* case-folded according to the value of the
* {@link http://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
* option.</p>
*/
public function current ($result_type = SQLITE_BOTH , $decode_binary = true) {}
/**
* Return the key of the current element
* @link http://php.net/manual/en/iterator.key.php
* @return mixed scalar on success, or null on failure.
* @since 5.0.0
*/
public function key () {}
/**
* Seek to the next row number
* @link http://php.net/manual/en/function.sqlite-next.php
* @return bool Returns <b>TRUE</b> on success, or <b>FALSE</b> if there are no more rows.
* @since 5.0.0
*/
public function next () {}
/**
* Checks if current position is valid
* @link http://php.net/manual/en/iterator.valid.php
* @return boolean <p>
* Returns <b>TRUE</b> if there are more rows available from the
* <i>result</i> handle, or <b>FALSE</b> otherwise.
* </p>
* @since 5.0.0
*/
public function valid () {}
/**
* Rewind the Iterator to the first element
* @link http://php.net/manual/en/iterator.rewind.php
* @return void Any returned value is ignored.
* @since 5.0.0
*/
public function rewind () {}
/**
* Count elements of an object
* @link http://php.net/manual/en/countable.count.php
* @return int <p>The custom count as an integer.
* </p>
* <p>
* The return value is cast to an integer.
* </p>
* @since 5.1.0
*/
public function count () {}
/**
* Seek to the previous row number of a result set
* @link http://php.net/manual/en/function.sqlite-prev.php
* @return boolean <p> Returns <b>TRUE</b> on success, or <b>FALSE</b> if there are no more previous rows.
* </p>
* @since 5.4.0
*/
public function prev () {}
/**
*@since 5.4.0
* Returns whether or not a previous row is available
* @link http://php.net/manual/en/function.sqlite-has-prev.php
* @return bool <p>
* Returns <b>TRUE</b> if there are more previous rows available from the
* <i>result</i> handle, or <b>FALSE</b> otherwise.
* </p>
*/
public function hasPrev () {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Returns the number of rows in a buffered result set
* @link http://php.net/manual/en/function.sqlite-num-rows.php
* @return int Returns the number of rows, as an integer.
*/
public function numRows () {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)
* Seek to a particular row number of a buffered result set
* @link http://php.net/manual/en/function.sqlite-seek.php
* @param $row
* <p>
* The ordinal row number to seek to. The row number is zero-based (0 is
* the first row).
* </p>
* <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
* unbuffered result handles.</p></blockquote>
*/
public function seek ($row) {}
}
/**
* Represents an unbuffered SQLite result set. Unbuffered results sets are sequential, forward-seeking only.
* @link http://php.net/manual/en/ref.sqlite.php
*/
final class SQLiteUnbuffered {
/**
* @param $result_type [optional]
* @param $decode_binary [optional]
*/
public function fetch ($result_type, $decode_binary) {}
/**
* @param $class_name [optional]
* @param $ctor_params [optional]
* @param $decode_binary [optional]
*/
public function fetchObject ($class_name, $ctor_params, $decode_binary) {}
/**
* @param $decode_binary [optional]
*/
public function fetchSingle ($decode_binary) {}
/**
* @param $result_type [optional]
* @param $decode_binary [optional]
*/
public function fetchAll ($result_type, $decode_binary) {}
/**
* @param $index_or_name
* @param $decode_binary [optional]
*/
public function column ($index_or_name, $decode_binary) {}
public function numFields () {}
/**
* @param $field_index
*/
public function fieldName ($field_index) {}
/**
* @param $result_type [optional]
* @param $decode_binary [optional]
*/
public function current ($result_type, $decode_binary) {}
public function next () {}
public function valid () {}
}
final class SQLiteException extends RuntimeException {
protected $message;
protected $code;
protected $file;
protected $line;
/**
* Clone the exception
* @link http://php.net/manual/en/exception.clone.php
* @return void
* @since 5.1.0
*/
final private function __clone () {}
/**
* Construct the exception
* @link http://php.net/manual/en/exception.construct.php
* @param $message [optional]
* @param $code [optional]
* @param $previous [optional]
* @since 5.1.0
*/
public function __construct ($message, $code, $previous) {}
/**
* String representation of the exception
* @link http://php.net/manual/en/exception.tostring.php
* @return string the string representation of the exception.
* @since 5.1.0
*/
public function __toString () {}
}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Opens a SQLite database and create the database if it does not exist
* @link http://php.net/manual/en/function.sqlite-open.php
* @param string $filename <p>
* The filename of the SQLite database. If the file does not exist, SQLite
* will attempt to create it. PHP must have write permissions to the file
* if data is inserted, the database schema is modified or to create the
* database if it does not exist.
* </p>
* @param int $mode [optional] <p>
* The mode of the file. Intended to be used to open the database in
* read-only mode. Presently, this parameter is ignored by the sqlite
* library. The default value for mode is the octal value
* 0666 and this is the recommended value.
* </p>
* @param string $error_message [optional] <p>
* Passed by reference and is set to hold a descriptive error message
* explaining why the database could not be opened if there was an error.
* </p>
* @return resource a resource (database handle) on success, false on error.
*/
function sqlite_open ($filename, $mode = null, &$error_message = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Opens a persistent handle to an SQLite database and create the database if it does not exist
* @link http://php.net/manual/en/function.sqlite-popen.php
* @param string $filename <p>
* The filename of the SQLite database. If the file does not exist, SQLite
* will attempt to create it. PHP must have write permissions to the file
* if data is inserted, the database schema is modified or to create the
* database if it does not exist.
* </p>
* @param int $mode [optional] <p>
* The mode of the file. Intended to be used to open the database in
* read-only mode. Presently, this parameter is ignored by the sqlite
* library. The default value for mode is the octal value
* 0666 and this is the recommended value.
* </p>
* @param string $error_message [optional] <p>
* Passed by reference and is set to hold a descriptive error message
* explaining why the database could not be opened if there was an error.
* </p>
* @return resource <p>a resource (database handle) on success, false on error.</p>
*/
function sqlite_popen ($filename, $mode = null, &$error_message = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Closes an open SQLite database
* @link http://php.net/manual/en/function.sqlite-close.php
* @param resource $dbhandle <p>
* The SQLite Database resource; returned from sqlite_open
* when used procedurally.
* </p>
* @return void
*/
function sqlite_close ($dbhandle) {}
/**
* (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)<br/>
* Executes a query against a given database and returns a result handle
* there are two signatures with <i>$query</i> first and with <i>$dbhandle</i> first.
* @link http://php.net/manual/en/function.sqlite-query.php
* @param string|resource $query <p>
* The query to be executed.
* </p>
* <p>
* Data inside the query should be properly escaped.
* </p>
* @param resource|string $dbhandle The SQLite Database resource; returned from sqlite_open() when used procedurally. This parameter is not required when using the object-oriented method.
* @param int $result_type [optional] &sqlite.result-type;<p>The optional <i>result_type</i>
* parameter accepts a constant and determines how the returned array will be
* indexed. Using <b>SQLITE_ASSOC</b> will return only associative
* indices (named fields) while <b>SQLITE_NUM</b> will return
* only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
* will return both associative and numerical indices.
* <b>SQLITE_BOTH</b> is the default for this function.</p>
* @param mixed $error_msg [optional] <p>
* The specified variable will be filled if an error occurs. This is
* specially important because SQL syntax errors can't be fetched using
* the
* {@see sqlite_last_error} function.
* </p>
* @return resource This function will return a result handle or <b>FALSE</b> on failure.
* For queries that return rows, the result handle can then be used with
* functions such as
* {@see sqlite_fetch_array} and
* {@see sqlite_seek}.
* </p>
* <p>
* Regardless of the query type, this function will return false if the
* query failed.
* </p>
* <p>
* {@see sqlite_query} returns a buffered, seekable result
* handle. This is useful for reasonably small queries where you need to
* be able to randomly access the rows. Buffered result handles will
* allocate memory to hold the entire result and will not return until it
* has been fetched. If you only need sequential access to the data, it is
* recommended that you use the much higher performance
* {@see sqlite_unbuffered_query} instead.
*/
function sqlite_query ($query, $dbhandle, $result_type = null, &$error_msg = SQLITE_BOTH) {}
/**
* (PHP 5, PECL sqlite >= 1.0.3)<br/>
* Executes a result-less query against a given database
* @link http://php.net/manual/en/function.sqlite-exec.php
* @param string $query <p>
* The query to be executed.
* </p>
* <p>
* Data inside the query should be properly escaped.
* </p>
* @param resource $dbhandle <p>
* The SQLite Database resource; returned from
* {@see sqlite_open()} when used procedurally. This parameter
* is not required when using the object-oriented method.
* </p>
* @param string $error_msg [optional] <p>
* The specified variable will be filled if an error occurs. This is
* specially important because SQL syntax errors can't be fetched using
* the
* {@see sqlite_last_error} function.
* </p>
* @return bool <p>This function will return a boolean result; true for success or false for failure.
* If you need to run a query that returns rows, see sqlite_query.</p>
*/
function sqlite_exec ($dbhandle, $query, &$error_msg = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Execute a query against a given database and returns an array
* @link http://php.net/manual/en/function.sqlite-array-query.php
* @param string $query <p>
* The query to be executed.
* </p>
* <p>
* Data inside the query should be properly escaped.
* </p>
* @param resource $dbhandle <p>
* The SQLite Database resource; returned from
* {@see sqlite_open()}
* when used procedurally. This parameter is not required
* when using the object-oriented method.
* </p>
* @param int $result_type [optional] &sqlite.result-type; <p>The optional <i>result_type</i>
* parameter accepts a constant and determines how the returned array will be
* indexed. Using <b>SQLITE_ASSOC</b> will return only associative
* indices (named fields) while <b>SQLITE_NUM</b> will return
* only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b>
* will return both associative and numerical indices.
* <b>SQLITE_BOTH</b> is the default for this function.</p>
* @param bool $decode_binary [optional] &sqlite.decode-bin; <p>When the <i>decode_binary</i>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
* {@link sqlite_escape_string()}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* @return array an array of the entire result set; false otherwise.
* <p>The column names returned by
* <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be
* case-folded according to the value of the
* {@link php.net/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration
* option.</p>
*/
function sqlite_array_query ($dbhandle, $query, $result_type = null, $decode_binary = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.1)<br/>
* Executes a query and returns either an array for one single column or the value of the first row
* @link http://php.net/manual/en/function.sqlite-single-query.php
* @param resource $db
* @param string $query
* @param bool $first_row_only [optional]
* @param bool $decode_binary [optional]
* @return array
*/
function sqlite_single_query ($db, $query, $first_row_only = null, $decode_binary = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Fetches the next row from a result set as an array
* @link http://php.net/manual/en/function.sqlite-fetch-array.php
* @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
* @param int $result_type [optional] &sqlite.result-type;
* @param bool $decode_binary [optional] &sqlite.decode-bin;
* @return array <p>an array of the next row from a result set; false if the
* next position is beyond the final row.</p>
*/
function sqlite_fetch_array ($result, $result_type = SQLITE_BOTH, $decode_binary = null) {}
/**
* Fetches the next row from a result set as an object
* @link http://php.net/manual/en/function.sqlite-fetch-object.php
* @param resource $result
* @param string $class_name [optional]
* @param array $ctor_params [optional]
* @param bool $decode_binary [optional]
* @return object
* @since 5.0
*/
function sqlite_fetch_object ($result, $class_name = null, array $ctor_params = null, $decode_binary = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.1)<br/>
* Fetches the first column of a result set as a string
* @link http://php.net/manual/en/function.sqlite-fetch-single.php
* @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
* @param bool $decode_binary [optional] <p>When the <b>decode_binary</b>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
* {@see sqlite_escape_string()}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* @return string <p>the first column value, as a string.</p>
*/
function sqlite_fetch_single ($result, $decode_binary = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* &Alias; {@see sqlite_fetch_single}
* @link http://php.net/manual/en/function.sqlite-fetch-string.php
* @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
* @param bool $decode_binary [optional] <p>When the <b>decode_binary</b>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
* {@see sqlite_escape_string()}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* @return string <p>the first column value, as a string.</p>
*/
function sqlite_fetch_string ($result, $decode_binary) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Fetches all rows from a result set as an array of arrays
* @link http://php.net/manual/en/function.sqlite-fetch-all.php
* @param int $result_type [optional] &sqlite.result-type;
* @param bool $decode_binary [optional] &sqlite.decode-bin;
* @return array <p>an array of the remaining rows in a result set. If called right
* after
* {@see sqlite_query}, it returns all rows. If called
* after
* {@see sqlite_fetch_array}, it returns the rest. If
* there are no rows in a result set, it returns an empty array.</p>
* <p>The column names returned by <b>SQLITE_ASSOC</b> and <b>SQLITE_BOTH</b> will be case-folded according to the value of the
* {@link http://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration option.</p>
*/
function sqlite_fetch_all ($result_type = null, $decode_binary = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Fetches the current row from a result set as an array
* @link http://php.net/manual/en/function.sqlite-current.php
* @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
* @param int $result_type [optional] <p>The optional result_type parameter accepts a constant and determines how the returned array will be indexed. Using <b>SQLITE_ASSOC</b> will return only associative indices (named fields) while <b>SQLITE_NUM</b> will return only numerical indices (ordinal field numbers). <b>SQLITE_BOTH</b> will return both associative and numerical indices. <b>SQLITE_BOTH</b> is the default for this function.</p>
* @param bool $decode_binary [optional] <p>When the decode_binary parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding it applied to the data if it was encoded using the sqlite_escape_string(). You should normally leave this value at its default, unless you are interoperating with databases created by other sqlite capable applications.</p>
* @return array an array of the current row from a result set; false if the
* current position is beyond the final row.
*/
function sqlite_current ($result, $result_type = null, $decode_binary = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Fetches a column from the current row of a result set
* @link http://php.net/manual/en/function.sqlite-column.php
* @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
* @param mixed $index_or_name <p>
* The column index or name to fetch.
* </p>
* @param bool $decode_binary [optional] <p>When the <b>decode_binary</b>
* parameter is set to <b>TRUE</b> (the default), PHP will decode the binary encoding
* it applied to the data if it was encoded using the
* {@see sqlite_escape_string()}. You should normally leave this
* value at its default, unless you are interoperating with databases created by
* other sqlite capable applications.</p>
* @return mixed the column value.
*/
function sqlite_column ($result, $index_or_name, $decode_binary = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Returns the version of the linked SQLite library
* @link http://php.net/manual/en/function.sqlite-libversion.php
* @return string the library version, as a string.
*/
function sqlite_libversion () {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Returns the encoding of the linked SQLite library
* @link http://php.net/manual/en/function.sqlite-libencoding.php
* @return string the library encoding.
*/
function sqlite_libencoding () {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Returns the number of rows that were changed by the most
recent SQL statement
* @link http://php.net/manual/en/function.sqlite-changes.php
* @param $db
* @return int the number of changed rows.
*/
function sqlite_changes ($db) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Returns the rowid of the most recently inserted row
* @link http://php.net/manual/en/function.sqlite-last-insert-rowid.php
* @param resource $dbhandle <p>The SQLite Database resource; returned from
* {@see sqlite_open()} when used procedurally. This parameter is not required when using the object-oriented method.</p>
* @return int the row id, as an integer.
*/
function sqlite_last_insert_rowid ($dbhandle) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Returns the number of rows in a buffered result set
* @link http://php.net/manual/en/function.sqlite-num-rows.php
* @param $result <p>
* The SQLite result resource. This parameter is not required when using
* the object-oriented method.
* </p>
* <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
* unbuffered result handles.</p></blockquote>
* @return int the number of rows, as an integer.
*/
function sqlite_num_rows ($result) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Returns the number of fields in a result set
* @link http://php.net/manual/en/function.sqlite-num-fields.php
* @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
* @return int the number of fields, as an integer.
*/
function sqlite_num_fields ($result) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Returns the name of a particular field
* @link http://php.net/manual/en/function.sqlite-field-name.php
* @param resource $result <p>The SQLite result resource. This parameter is not required when using the object-oriented method.</p>
* @param int $field_index <p>
* The ordinal column number in the result set.
* </p>
* @return string the name of a field in an SQLite result set, given the ordinal
* column number; false on error.
*/
function sqlite_field_name ($result, $field_index) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Seek to a particular row number of a buffered result set
* @link http://php.net/manual/en/function.sqlite-seek.php
* @param resource $result <p>
* The SQLite result resource. This parameter is not required when using
* the object-oriented method.
* </p>
* <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
* unbuffered result handles.</p></blockquote>
* @param int $rownum <p>
* The ordinal row number to seek to. The row number is zero-based (0 is
* the first row).
* </p>
* @return bool false if the row does not exist, true otherwise.
*/
function sqlite_seek ($result, $rownum) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Seek to the first row number
* @link http://php.net/manual/en/function.sqlite-rewind.php
* @param resource $result <p>
* The SQLite result resource. This parameter is not required when using
* the object-oriented method.
* </p>
* <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
* unbuffered result handles.</p></blockquote>
* @return bool false if there are no rows in the result set, true otherwise.
*/
function sqlite_rewind ($result) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Seek to the next row number
* @link http://php.net/manual/en/function.sqlite-next.php
* @param resource $result <p>
* The SQLite result resource. This parameter is not required when using
* the object-oriented method.
* </p>
* <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
* unbuffered result handles.</p></blockquote>
* @return bool <b>TRUE</b> on success, or <b>FALSE</b> if there are no more rows.
*/
function sqlite_next ($result) {}
/**
* Seek to the previous row number of a result set
* @link http://php.net/manual/en/function.sqlite-prev.php
* @param resource $result <p>
* The SQLite result resource. This parameter is not required when using
* the object-oriented method.
* </p>
* <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
* unbuffered result handles.</p></blockquote>
* @return bool true on success, or false if there are no more previous rows.
* @since 5.0
*/
function sqlite_prev ($result) {}
/**
* Returns whether more rows are available
* @link http://php.net/manual/en/function.sqlite-valid.php
* @param resource $result <p>
* The SQLite result resource. This parameter is not required when using
* the object-oriented method.
* </p>
* <blockquote><p><b>Note</b>: </p><p>This function cannot be used with
* unbuffered result handles.</p></blockquote>
* @return bool <b>TRUE</b> if there are more rows available from the
* result handle, or <b>FALSE</b> otherwise.
* @since 5.0
*/
function sqlite_valid ($result) {}
/**
* (PHP 5, PECL sqlite >= 1.0.0)<br/>
* Finds whether or not more rows are available
* @link http://php.net/manual/en/function.sqlite-has-more.php
* @param resource $result <p>
* The SQLite result resource.
* </p>
* @return bool <b>TRUE</b> if there are more rows available from the
* result handle, or <b>FALSE</b> otherwise.
*/
function sqlite_has_more ($result) {}
/**
* Returns whether or not a previous row is available
* @link http://php.net/manual/en/function.sqlite-has-prev.php
* @param resource $result <p>
* The SQLite result resource. This parameter is not required when using
* the object-oriented method.
* </p>
* @return bool <b>TRUE</b> if there are more previous rows available from the
* result handle, or <b>FALSE</b> otherwise.
* @since 5.0
*/
function sqlite_has_prev ($result) {}
/**