Jay -- Are you saying that:
(a) sqlite3_complete("") returns 0 in your system and therefore I must be doing something wrong, (b) or sqlite3_complete("") does return 1 and it is a bug? If I am doing something wrong, does anyone have an idea of what it could be? The workaround is easy enough, but I am just curious if I have some setting or something wrong. Thanks, Nick > On 12/16/2009 5:22 PM, Jay A. Kreibich wrote: > > On Wed, Dec 16, 2009 at 04:52:16PM -0500, Nicolas Rivera scratched on the > wall: > >> Thanks for your reply Dr. Hipp. >> >> I just ran those, and they do return 0. >> >> But I am confused. The documentation says: >> "These routines return 1 if the input string appears to be a complete >> SQL statement. A statement is judged to be complete if it ends with a >> semicolon token and is not a prefix of a well-formed CREATE TRIGGER >> statement." >> (http://www.hwaci.com/sw/sqlite/c3ref/complete.html) >> > > >> I guess a statement is also judged to be complete if it is the empty >> string -- which does not end with a semicolon token. >> > > > That seems wrong; empty string should return a 0 as the string does > not contain "one or more non-whitespace tokens." > > http://sqlite.org/hlr10000.html#H10511 > > H10511: A successful evaluation of sqlite3_complete() or > sqlite3_complete16() functions shall return a numeric 1 if and only > if the input string contains one or more non-whitespace tokens and > the last non-whitespace token in is a semicolon that is not in the > middle of a CREATE TRIGGER statement. > > -j > > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users