On Wed, 17 Aug 2011 14:45:22 +0100, Simon Slavin
<[email protected]> wrote:

>
>On 17 Aug 2011, at 2:26pm, Igor Tandetnik wrote:
>
>> Simon Slavin <[email protected]> wrote:
>>> Question for experts: Hmm.  There's no sqlite3_exec16() ?
>>> Do I misunderstand how it would be useful ?
>> 
>> sqlite3_exec is a thin wrapper around sqlite3_prepare,
>> step and finalize, maintained for backward compatibility.
>> Just use those, or their _16 counterparts, directly.
>
> Parsing a long string containing many SQL commands to
> find out where the commands are separated is non-trivial. 
> I figured that the necessary logic must already be built
> into SQLite somewhere.

> But hey, I don't actually have a use for this,
> it's just that the omission looks a little strange.

It is built in. The first sqlite3_prepare*() on a multiple
statement string parses until the first statement delimiter, ';',
and returns a pointer to the rest of the string (pzTail), so if
properly used, the next sqlite3_prepare*() parses the next
statement in the same multiple statement string.
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to