Hello,

[ Sorry for the second email, but I wanted to
  separate this ]

Would a...

 sqlite3_begin(sqlite3 *db, int type)
 sqlite3_end( sqlite3 *db )

be helpful for people counting transactions
in a thread environment?

The only difference to doing the 'transaction
level' counting yourself is that those
functions would use the structure 'sqlite3 *db'
to keep track of if a tranaction is in progress
or not.

The begin and end functions could be configured
to begin/end the transaction *if* there isn't/is
one.

ie.

func1()
{
        sqlite3_begin(...)
        func2();
        DoSQLStuff...
        sqlite3_end(...)
}

func2()
{
        sqlite3_begin(...)
        DoSQLStuff...
        sqlite3_end(...)
}

...would work in a threaded environment since
each thread as its own copy of 'sqlite3 *db'
anyway.  func2() would also work as expected
whether called in or outside func1().

Dumb idea?
Do I get get to wear the dunce hat? :)

-
Kervin

Reply via email to