On Nov 7, 2006, at 5:17 AM, [EMAIL PROTECTED] wrote:

QUESTION 1: sqlite3_prepare_v2 is the merely the working name
for the new function.  What should the official name be?

What about introducing an options mechanism in place of a second prepare mechanism? Do you foresee any situations where a developer may want to use both the existing and the enhanced prepare/step mechanism on the same database handle?

Here's a rough cut at what I'd expect an options mechanism to look like.

  /* in sqlite3.h */
  struct sqlite3_options {
      int option;
      void *parameter;
  };

#define SQLITE3_OPTION_ENHANCED_PREPARE 1 /* enhanced prepare/step behavior */

  /* in user code */

  struct sqlite3_options options = {
      SQLITE3_OPTION_ENHANCED_PREPARE,
      (void *) 1 /* turn the option on */
  };

  err = sqlite3_set_options(&db, 1, &options);

/* After this point the new prepare and step behavior is in force for the database handle db. The option could be turned off if necessary, but
     it always applies to all operations on the database handle db. */

QUESTION 3: Suppose there is a schema change and the SQL
statement is automatically reprepared. But the schema change
is such that the SQL is no longer valid.  (Perhaps one of the
tables mentioned in a SELECT statement was dropped.) What
error code should sqlite3_step() return in that case?

I think SQLITE_SCHEMA would not be unreasonable, especially since it would represent a much more significant situation than SQLITE_SCHEMA as returned by sqlite3_prepare used to.

  -- Chris


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to