Comments have no effect on the completeness of a statement, you will have to look for leading '--' explicitly.
On Sun., 14 Oct. 2018, 13:38 Roger Binns, <[email protected]> wrote: > I use sqlite3_complete in my shell in order to determine when a complete > statement has been input and can be run. (Otherwise a continuation > "sqlite> " prompt is shown.) > > If the line entered is: > > -- hello > > Then the sqlite shell does not issue a continuation and "executes" the > text. However sqlite3_complete does not say that line is complete so > the command line shell has extra logic to figure this out. What is the > right way of considering line comment complete as the SQLite shell? > > These lines get True from sqlite3_complete: > > select 3; -- > select 3 /* */ ; > > And these get False: > > select 3 > -- > -- ; > > > > Roger > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

