Commit Graph

144 Commits

Author SHA1 Message Date
Marcus Boerger
d9d082072c Omitting is also possible here 2003-09-05 20:09:19 +00:00
Marcus Boerger
f05525a0ef WS 2003-09-05 20:05:08 +00:00
Marcus Boerger
421e2e9275 Go with the mess 2003-09-04 14:54:53 +00:00
Zeev Suraski
8767205afa Fix Win32 linkage problems 2003-08-31 12:41:53 +00:00
Marcus Boerger
c3f7ea3510 Fix property inheritance by using dedicated new function 2003-08-29 23:30:03 +00:00
Marcus Boerger
0cb983885d Throw exception if user wants to pass arguments to an non existing constructor 2003-08-29 21:33:24 +00:00
Marcus Boerger
adaf6429a7 Throw exception if user wants to pass arguments to an non existing constructor 2003-08-29 21:32:25 +00:00
Marcus Boerger
eb8d89c363 Allow to pass arguments to the constructor 2003-08-29 21:13:50 +00:00
Marcus Boerger
b75133c0c6 Need to check if we got any value before destroying it 2003-08-28 23:36:46 +00:00
Marcus Boerger
90561350f9 Add sqlite_fetch_object() 2003-08-28 23:19:51 +00:00
Marcus Boerger
0bd1567fe1 Update exception code 2003-08-25 20:55:14 +00:00
Marcus Boerger
0d5ee859dd Fix warnings 2003-08-17 15:43:41 +00:00
Marcus Boerger
fb1288d067 # Wez, your whish is my command 2003-08-12 21:29:28 +00:00
Marcus Boerger
ab9198e396 Bugfix #25056 2003-08-12 21:15:16 +00:00
Zeev Suraski
538d58dd5f Use new infrastructure.
There are bound to be some messups, please report build/runtime bugs!
2003-08-03 17:44:39 +00:00
Marcus Boerger
08f725fa24 Remove this then, too 2003-07-20 18:05:03 +00:00
Marcus Boerger
7dd6f48f45 SQLite objects are not cloneable. Maybe we allow this later for sqlite_db. 2003-07-20 18:00:54 +00:00
Sebastian Bergmann
aeefb55a6a Cleanup, as suggested by Andi. 2003-07-19 11:00:17 +00:00
Sebastian Bergmann
83bf4599b7 ZTS fix. 2003-07-14 05:52:57 +00:00
Wez Furlong
78e236da26 Add sqlite_has_prev, and sqlite_prev.
Patch by Jan Lehnardt <jan@php.net>
2003-07-13 09:38:33 +00:00
Wez Furlong
ce2a4d9121 MFB better popen fix 2003-07-13 09:20:40 +00:00
Wez Furlong
e17043c248 Fix bug #24575 (sqlite_popen did not request a new resource id when persistent
handles were re-used within a request).
2003-07-13 08:48:43 +00:00
Marcus Boerger
af3be899e6 fix this stupid error 2003-07-08 23:10:01 +00:00
Marcus Boerger
139852d3ff Fix bug #24540 2003-07-08 18:57:28 +00:00
Marcus Boerger
f145b163a8 - In function sqlite_field_name the index parameter is not optional.
- Fix all the protos.
2003-07-05 20:02:40 +00:00
Marcus Boerger
d531dee390 Fix warnings and allow builds without ext/session 2003-07-01 17:55:32 +00:00
Wez Furlong
090328fd32 silence warning under win32
(maybe!)
2003-07-01 13:26:49 +00:00
Wez Furlong
607b6501ed Add sqlite session handler.
Modified (quite a bit!) patch from John Coggeshall.
It compiles, but it otherwise untested.
session.save_path == path to actual database file for the session.

eg: session.save_path=/tmp/mysite-session.db
2003-07-01 13:07:37 +00:00
Edin Kadribasic
7730c1d994 Fix windows build 2003-06-27 14:30:26 +00:00
Marcus Boerger
a0ecfc9c31 errmsg must be ref 2003-06-26 21:07:07 +00:00
Marcus Boerger
add3674b20 Rename sqlite_fetch_string() to sqlite_fetch_single() + alias 2003-06-26 19:26:26 +00:00
Marcus Boerger
bbfa7cae25 Fix memleak 2003-06-26 19:07:17 +00:00
Marcus Boerger
30b4f8f494 Fix a warning 2003-06-25 23:21:10 +00:00
Ilia Alshanetsky
0dc20e8bea ZTS typo 2003-06-25 23:14:19 +00:00
Sterling Hughes
12b06799ae Don't pass resource as an argument when its not being parsed. 2003-06-25 17:22:31 +00:00
Ilia Alshanetsky
94b90d0c0a Added sqlite_single_query() and it's OO equivalent single_query(). 2003-06-25 16:59:24 +00:00
Ilia Alshanetsky
28347d74bb port sqlite_array_query() fix from PHP_4_3 2003-06-23 19:37:48 +00:00
Marcus Boerger
9d6f63ef71 Remove sqlite::close() 2003-06-22 19:00:44 +00:00
Marcus Boerger
f2d26fc85d Add oo API 2003-06-22 17:19:46 +00:00
Wez Furlong
3a550b3c8c Prepare for 1.0 release 2003-06-21 13:29:26 +00:00
Wez Furlong
9e858102a8 Add a pair of functions to handle the binary coding used by PHP from within
UDF callbacks.

Add test for binary functions.
Fix proto.
2003-06-21 12:29:32 +00:00
Wez Furlong
425882ef70 Some tweaks ready for the upcoming 1.0 release. 2003-06-19 20:57:11 +00:00
Wez Furlong
20ee07ef92 Should build with PHP5 now... 2003-06-18 19:48:02 +00:00
Marcus Boerger
8f2b387c61 - Update license
- Don't buffer in non buffered mode
2003-06-14 18:16:47 +00:00
Marcus Boerger
e1652789ea - Add sqlite_array_query().
- Make all read functions destructive when in unbuffered read mode.
2003-06-09 23:14:25 +00:00
Ilia Alshanetsky
d3ad6e640d Do not perform safe_mode & open_basedir checks for memory-only databases. 2003-06-09 20:36:55 +00:00
Marcus Boerger
eccfbe5f88 WS 2003-06-07 11:38:03 +00:00
Wez Furlong
30fc9e152f Update bundled library to 2.8.3 + patches from sqlite author to enable
authorization checks for the ATTACH database command.
2003-06-06 22:44:57 +00:00
Marcus Boerger
797654bde7 New fetch_all() an fetch optimization reworked (original idea by ilia) 2003-06-06 19:00:16 +00:00
Wez Furlong
80e7f7001d Update bundled library to version 2.8.2.
Make OnUpdateInt compatible with ZE2.
Fix the makefile fragment for non-gnu makes
2003-06-04 22:40:00 +00:00
Wez Furlong
82a1818fde Revert accidental commit from marcus. 2003-06-04 21:11:45 +00:00
Marcus Boerger
b70cf40742 Goodbye namespaces 2003-06-04 20:54:48 +00:00
Wez Furlong
1a521e5ab6 Prep for next release 2003-05-14 13:05:22 +00:00
Ilia Alshanetsky
f1c20d3b55 Added sqlite_fetch_string(), for speedy fetching of data from database
cursor containing only a single column.
2003-05-13 23:51:25 +00:00
Marcus Boerger
815ad75c49 - Indendation fix
- Proto fix
- Add efficient single column access function: sqlite_column()
2003-05-03 12:51:13 +00:00
Marcus Boerger
0c11675902 Fix MFN error (now really) 2003-05-02 22:22:16 +00:00
Marcus Boerger
b8c5cd2a9d Fix MFN error 2003-05-02 22:17:01 +00:00
Marcus Boerger
7a17b23190 Add iterator interface and test 2003-05-02 22:09:54 +00:00
Marcus Boerger
2c2774c204 Don't return table names 2003-05-01 13:20:22 +00:00
Marcus Boerger
bafbc8bdb2 Allow both parameter orderings 2003-04-30 15:22:57 +00:00
Marcus Boerger
4ad3ecc758 Allow to set result_type default for each query 2003-04-30 15:18:59 +00:00
Wez Furlong
3bf392c160 Seems like a better fix.. 2003-04-27 14:01:09 +00:00
Marcus Boerger
783d1d7b24 More safe_emalloc() 2003-04-27 13:46:07 +00:00
Wez Furlong
23c4c206a4 WS, plus default: would prevent case SQLITE_DONE: in php_sqlite_fetch(). 2003-04-27 13:32:43 +00:00
Marcus Boerger
fe94e0394e Enable some more functions with unbuffered queries 2003-04-27 13:25:10 +00:00
Wez Furlong
604a41e244 win32 fixes 2003-04-22 23:24:44 +00:00
Wez Furlong
11a96965c9 Add windows .dsp and some kludgy pre-generated headers. 2003-04-22 19:06:31 +00:00
Wez Furlong
71722f28ba I will use my brain properly next time 2003-04-22 00:21:02 +00:00
Wez Furlong
eb22d78db8 allow sqlite_query() to accept the query string and database resource in
either order.

Forgot to bump the package version number displayed by phpinfo()...
Bump to 0.9a
2003-04-22 00:19:48 +00:00
Edin Kadribasic
43349ea014 Added sqlite.assoc_case ini entry with 0 as the default value.
0 - Make no changes to the keys in the associative array
1 - Change the keys to uppercase
2 - Change the keys to lowercase
2003-04-22 00:08:48 +00:00
Wez Furlong
8ccae81db2 Eliminate leaks from registering plain or aggregate functions.
Also, reduce (probably eliminate) the risk of a segfault when registering a
callback on a persistent connection and later triggering the callback from a
different script.
2003-04-20 15:13:04 +00:00
Wez Furlong
d40a615a8e Implement sqlite_create_function(), which allows binding of php functions by
name; this is a higher performance alternative to the generic php() SQL
function. (saves parsing the additional function call in the SQL and a call to
zend_is_callable on each function invocation).

Add test for sqlite_create_function().

Fixup proto for sqlite_create_aggregate().

Tweak package file and speling in header file.
2003-04-20 13:31:36 +00:00
Tal Peer
b0d26a11ac Remove rendundant function 2003-04-20 13:21:17 +00:00
Tal Peer
a676f6c29d Update 2003-04-20 13:15:45 +00:00
Wez Furlong
4a46882648 Implement sqlite_create_aggregate() which can be used to create aggregation
functions for use in SQL statements.
2003-04-20 13:08:22 +00:00
Wez Furlong
ff0d6adda4 Transparently decode binary encoded data.
Add a test-case for that process.

When encoding binary data, we mark the string with \x01 as its first character.
When returning data via sqlite_fetch_array(), if the first character is \x01,
then we decode the encoding.  This behaviour can be turned off by the optional
last parameter to sqlite_fetch_array(), for compatibility with databases
created with other applications.
2003-04-19 12:54:17 +00:00
Wez Furlong
6640260253 Fix 2 potential segfaults. 2003-04-19 10:28:45 +00:00
Marcus Boerger
d323659e5f ZTS fixes 2003-04-18 19:43:38 +00:00
Wez Furlong
8f30d3e545 Implement sqlite_popen(), which opens persistent connections to an sqlite
database file.  (This saves the cost of sqlite reading/parsing the indices).

Persistent db connections have any pending transactions rolled back at request
shutdown time. (non-persistent connections are automatically rolled back when
they are closed).

Enhance sqlite_query() and sqlite_unbuffered_query() to use the C api
sqlite_exec() when the PHP script does not use the return value. This avoids
the extra work and memory allocation for holding result sets when they are not
needed.
2003-04-18 16:30:16 +00:00
Wez Furlong
8ed14ff16f Implement sqlite_unbuffered_query(), which works similarly to the mysql
function with a similar name.

Change sqlite_query() to use the same mechanism as the unbuffered query; this
moves the bulk of the memory allocations into the ZE memory manager, and will
hopefully be more efficient and less at risk of leaks.
2003-04-18 12:22:43 +00:00
Wez Furlong
0098ae7dc6 Constants for error codes 2003-04-17 20:17:54 +00:00
Wez Furlong
a016cfb10a Folding markers 2003-04-17 20:09:45 +00:00
Wez Furlong
ec09b1b881 Add two new functions:
int sqlite_last_error($db) -- returns error code from last query

string sqlite_error_string(int code) -- returns english description of an error
code.
2003-04-17 20:08:00 +00:00
Wez Furlong
cca9ebddae Add pecl release version to phpinfo output 2003-04-17 19:13:21 +00:00
Wez Furlong
3cf1e2c7ed Add safe_mode and open_basedir checks for the COPY SQL statement. 2003-04-17 18:54:40 +00:00
Wez Furlong
c53b5743df WS 2003-04-17 17:15:36 +00:00
Wez Furlong
4d9ca8f135 NULL columns are NULL pointers 2003-04-17 17:09:59 +00:00
Wez Furlong
4eba9b8b46 Implement sqlite_busy_timeout() which sets the retry timeout (in milliseconds)
when multiple processes attempt to lock and update the database.
2003-04-17 16:57:46 +00:00
Wez Furlong
28128e4154 Segfault fixing! 2003-04-17 16:36:59 +00:00
Wez Furlong
826583dc91 Nicer error message when an invalid function name is specified. 2003-04-17 03:38:20 +00:00
Wez Furlong
c73e304dc2 Implement a php function so that the following SQL can be used:
SELECT php('md5', sql) from sqlite_master

The php function has takes the name of a php function to call as the first
parameter; each additional parameter is passed on to the function, much like
call_user_func().

You can call both built-in and script-defined functions in this way.
2003-04-17 03:14:14 +00:00
Wez Furlong
5e0b9bb451 Implement sqlite_escape_string() function. 2003-04-17 02:20:26 +00:00
Wez Furlong
2d14d8b520 Implement safe_mode and open_basedir checks.
Add package.xml
2003-04-17 01:57:55 +00:00
Wez Furlong
25954d1d72 This commit was generated by cvs2svn to compensate for changes in r123706,
which included commits to RCS files with non-trunk default branches.
2003-04-17 01:29:45 +00:00