Sets a busy handler that sleeps for the specified amount of time when a table is locked. The handler sleeps multiple times
until the specified time has been accumulated. After the specified milliseconds of sleeping, the handler returns 0 which
causes
step to return BUSY or IOERR_BLOCKED.
Arguments: |
The arguments are:
milliseconds |
The whole number of milliseconds the busy handler should sleep when a table is locked. Ifmillisecondsis less than or equal to zero all busy handlers are turned off.
|
|
Return value: |
This method will aways returnOK.
|
Remarks: |
After the specified milliseconds of sleeping, the handler returns 0 which causes step to return BUSY or IOERR_BLOCKED. There can only be a single busy handler for a
particular database connection any any given moment. If another busy handler was defined, using busyHandler , prior to calling this routine, that other busy handler is cleared.
|
Details: |
The functionality of thebusyTimeOutmethod is similar to that of the SQLite
sqlite3_busy_timeout API.
|
Example: |
This example sets a busy timeout value of 3 seconds:
db = .ooSQLiteConnection~new('phoneBook.rdbx') |
if db~initCode >.<. 0 then return db~lastErrCode |
|
db~busyTimeout(3000)
|
|