blob: f42ff663c03c4db6deaded9a958ace9514440b48 (
plain) (
blame)
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
|
2007-August-15 e
Version "0.6-devel"
Since the "0.5-devel" release of this Lua library...
Tested with SQLite 3.4.2
Added some documentation.
Thanks to Thomas Lauer...
Moved line 525 ("luaL_checktype(L, 2, LUA_TTABLE);")
below the declarations to eliminate non-gcc compiler errors.
Added create-collation, and associated test case.
-=-
2006-October-02 e
Since the "0.1-devel" release of this Lua library...
- updated for Lua 5.1
- provide automatic re-preparation of queries after schema changes
- made prepared statements with bindings work with for-loops
- added some compatibility names
- added many test cases, and ported Mike Roth's tests and examples
-=-
Below is a header comment from the 2004 "0.1" version of the library...
/************************************************************************
$Id: lsqlite3.c,v 1.3 2004/09/05 17:50:32 tngd Exp $
To consider:
------------
EXPERIMENTAL APIs
* sqlite3_progress_handler (implemented)
* sqlite3_commit_hook
TODO?
* sqlite3_create_collation
Changes:
04-09-2004
----------
* changed second return value of db:compile to be the rest of the
sql statement that was not processed instead of the number of
characters of sql not processed (situation in case of success).
* progress callback register function parameter order changed.
number of opcodes is given before the callback now.
29-08-2004 e
------------
* added version() (now supported in sqlite 3.0.5)
* added db:errmsg db:errcode db:total_changes
* rename vm:get_column to vm:get_value
* merge in Tiago's v1.11 change in dbvm_tostring
23-06-2004 e
------------
* heavily revised for SQLite3 C API
* row values now returned as native type (not always text)
* added db:nrows (named rows)
* added vm:bind_blob
* added vm:get_column
* removed encode_binary decode_binary (no longer needed or supported)
* removed version encoding error_string (unsupported in v 3.0.1 -- soon?)
09-04-2004
----------
* renamed db:rows to db:urows
* renamed db:prows to db:rows
* added vm:get_unames()
* added vm:get_utypes()
* added vm:get_uvalues()
08-04-2004
----------
* changed db:encoding() and db:version() to use sqlite_libencoding() and
sqlite_libversion()
* added vm:columns()
* added vm:get_named_types()
* added vm:get_named_values()
* added db:prows - like db:rows but returns a table with the column values
instead of returning multiple columns seperatly on each iteration
* added compatibility functions idata,iname,itype,data,type
* added luaopen_sqlite_module. allow the library to be loaded without
setting a global variable. does the same as luaopen_sqlite, but does not
set the global name "sqlite".
* vm:bind now also returns an error string in case of error
31-03-2004 - 01-04-2004
-----------------------
* changed most of the internals. now using references (luaL_ref) in
most of the places
* make the virtual machine interface seperate from the database
handle. db:compile now returns a vm handle
* added db:rows [for ... in db:rows(...) do ... end]
* added db:close_vm
* added sqlite.encode_binary and sqlite.decode_binary
* attempt to do a strict checking on the return type of the user
defined functions returned values
18-01-2004
----------
* add check on sql function callback to ensure there is enough stack
space to pass column values as parameters
03-12-2003
----------
* callback functions now have to return boolean values to abort or
continue operation instead of a zero or non-zero value
06-12-2003
----------
* make version member of sqlite table a function instead of a string
************************************************************************/
|