threadSafe



Tests to see if the currently running database engine is using a library that is thread safe.

Arguments: There are no arguments for this method.
Return value: The return is the value of the compile-time option SQLITE_THREADSAFE, 0, 1, or 2.
Remarks: Currently, ooSQLite is compiled with SQLITE_THREADSAFE=1 and therefore the return from this method is always 1. When SQLITE_THREADSAFE is set to 1, as it is in ooSQLite, then SQLite uses itsSerializedthreading model. In serialized mode, SQLite can be safely used by multiple threads with no restriction.
Details The functionality of thethreadSafemethod is similar to that of the SQLite sqlite3_threadsafe API.
Example: This example shows the return fromthreadSafe:
say 'Thread safe value:' .ooSQLite~threadSafe
/* Output will be:
Thread safe value: 1
*/