SqliteClient: Use the working HGlobal String-to-Ptr functions rather than CoTaskMem.
[mono.git] / mcs / class / Mono.Data.SqliteClient / Mono.Data.SqliteClient / ChangeLog
1 2006-03-11  Joshua Tauberer  <tauberer@for.net>
2
3         * Use HGlobal rather than CoTaskMem String-To-Ptr functions in
4           Marshal class.  StringToCoTaskMemAnsi is broken (pending it
5           being fixed): it actually uses Ansi, instead of UTF-8.  Now,
6           Sqlite2 with no encoding parameter uses UTF-8 encoding.  Any
7           Sqlite2 DB since Jan. 20 was encoded in ANSI but unreadable
8           back.
9
10 2006-03-07  Kamil Skalski  <nazgul@nemerle.org>
11
12         * SqliteDataReader.cs: Handle null values in result as having
13         string type
14
15 2006-02-10  Joshua Tauberer  <tauberer@for.net>
16
17         * SqliteDataReader: Made 64bit clean.  Patch from
18           Joe Shaw <joeshaw@novell.com>.
19
20 2006-01-22  Joshua Tauberer  <tauberer@for.net>
21
22         Most of the below fixes (in previous changes too) are thanks
23         to Thomas Zoechling and Tom Surace, and the byte[]->blob
24         parameter binding is thanks to <pablosantosluac@terra.es>.
25         
26         * SqliteCommand.cs:
27           - Don't use a regex for finding parameters in v2.
28           It didn't work when there were no parameters in
29           the query (infinite loop of some sort -- should be filed
30           as a Mono bug I guess).  Just scan for parameters names
31           that aren't within quotes.
32           - That wasn't even being called.  Now it is.
33           - Marshaling for sqlite3_bind_parameter_name was wrong, as
34           was the unicode call to bind_text16 which was looking for
35           byte length of string while we were providing char length.
36           - Bind byte[] parameters as blobs.
37           - Trim the SQL string.  Trailing spaces makes it think
38           another statement is coming along.
39         * SqliteDataReader.cs: When DATE/DATETIME columns come
40           back as Int64s, return them using DateTime.FromFileTime.
41           And don't return Int64s as ints if they aren't in the
42           range of an int.
43           - Check column names case-insensitively (bug 77272).
44         * SqliteParameter.cs: Public parameter names made nicer.
45         * SqliteParameterCollection.cs: Allow users to set parameter
46           names with or without the : prefix that Sqlite wants.
47         * Sqlite.cs: Supporting changes.
48         * SqliteDataReader, SqliteConnection: ToLower with the
49           invariant culture (bug 77372).
50
51 2006-01-20  Joshua Tauberer  <tauberer@for.net>
52
53         * Sqlite3 calls now use unicode encoding.  Sqlite2
54           calls use ANSI encoding (a superset of the default
55           expected encoding ISO8859-1), unless the new
56           encoding= connection string argument is used,
57           in which case that encoding is used.  But that encoding
58           must use a single-byte null terminator, so only
59           UTF-8 is recommended.  This removes the dependency
60           on Mono.Posix.  If UTF-8 encoding is used, Sqlite2's
61           LIKE, GLOB, LENGTH, and SUBSTR aren't going to respect
62           multibyte chars unless Sqlite was specifically compiled
63           to do so.
64         * SqliteDataReader.this[] is fixed to wrap GetValue.
65
66 2006-01-06  Joshua Tauberer  <tauberer@for.net>
67
68         * SqliteDataReader.cs: GetFieldType can be called
69           before the reader is positioned on a row.  In that
70           case, return the types for the first row.
71
72 2006-01-02  Joshua Tauberer  <tauberer@for.net>
73
74         * SqliteCommand.cs: It was revealed that preparing
75           statements ahead of time was not possible as table
76           schema changes lead to errors.  This needed serious
77           reorganization.  SQL syntax errors and BUSY errors
78           are now raised in nice exceptions.
79         * SqliteDataReader.cs:
80                 * Use object[] in place of ArrayList for each row.
81                 * For Sqlite3, which remembers whether a value was
82                   an integer, text, real, or blob, actually return
83                   longs, strings, doubles, and byte[]s.
84                 * GetDataTypeName() works where possible (Sqlite3).
85                 * INT/INTEGER columns are now returned as ints,
86                   rather than longs, for Sqlite3.  Similarly for
87                   DATE and DATETIME columns, now returning DateTimes.
88         * SqliteConnection.cs.cs: BeginTransaction(IsolationLevel)
89           throws InvalidOperationException per the MS docs.
90         * SqliteExceptions.cs: New file with SqliteSyntaxException,
91           SqliteExecutionException, and its subclass SqliteBusyException.
92
93 2005-12-27  Jonathan Pryor  <jonpryor@vt.edu>
94
95         * SqliteCommand.cs: Use non-obsolete UnixMarshal members.
96
97 2005-10-06  Chris Lahey  <clahey@localhost.localdomain>
98
99         * SqliteCommand.cs (Prepare): Use UnixMarshal here to get proper
100         utf8 behavior.
101
102 2005-07-28  Joshua Tauberer <tauberer@for.net>
103
104         * Sqlite.cs, SqliteCommand.cs: Report string error messages
105         in prepare, for version 3.
106
107 2005-07-26  Joshua Tauberer <tauberer@for.net>
108
109         SQL commands can have multiple statements within them (i.e.
110         separated by semicolons).  Sqlite has to be instructed to
111         process each command.
112         
113         * Sqlite.cs: Pass the sql command as an IntPtr so we can
114           see where pzTail takes us.
115         * SqliteCommand.cs: Lazily load sql_params for good measure.
116           Iterate compile/prepare until each statement in the string
117           has been processed, and retain pointers to each compiled
118           statement.  When executing, run all of the statements.
119
120 2005-06-14  Thomas Zoechling <thomas.zoechling@gmx.at>
121
122         * Sqlite.cs:
123         - Added sqlite3_bind_* for native Sqlite3 Parameters
124         * SqliteCommand.cs
125         - Added methods for parameter processing/binding (sqlite3 uses bind / sqlite2 uses regEx to extract parameters)
126         - Sqlite uses ':' as delimeter!
127         * SqliteParameterCollection.cs
128         - Chris Turchin fixed a problem in the Parameter Hashmap
129         * SqliteTransaction.cs
130         - The CommandText for the Rollback Command was "COMMIT" ! ->changed :)
131
132 2005-05-20  Sureshkumar T  <tsureshkumar@novell.com>
133
134         * SqliteConnection.cs:
135         - SetConnectionString: trim white spaces, ignore empty connection
136         string options.
137         - SetConnectionString: if file://,db_file starts from pos 7 not 6.
138
139