Commit f32d045280fddc9d27e25ae3616e50788e1d81bf
1 parent
48d7497d
Minor corrections on low level sqlite3 API
Showing
4 changed files
with
0 additions
and
136 deletions
Show diff stats
anubis_dev/compiler/src/predef.dat deleted
No preview for this file type
anubis_dev/compiler/src/predef_1_9.dat deleted
No preview for this file type
anubis_dev/library/data_base/sqlite.anubis
| ... | ... | @@ -352,34 +352,6 @@ public define Result(SQLite3Error, SQLite3Datum) |
| 352 | 352 | |
| 353 | 353 | |
| 354 | 354 | |
| 355 | - define Result((SQLite3Error, Maybe($R)), $R) | |
| 356 | - db_do_commit | |
| 357 | - ( | |
| 358 | - SQLite3DataBase db, | |
| 359 | - $R result, | |
| 360 | - (SQLite3Error) -> One log, | |
| 361 | - Int retries, | |
| 362 | - ) = | |
| 363 | - if sql_query(db, "COMMIT") is | |
| 364 | - { | |
| 365 | - error(err) then | |
| 366 | - if (err.code = 1 | err.code = 5) & retries > 0 then // error 1 = SQLITE_ERROR --> a SELECT statement isn't finished | |
| 367 | - // error 5 = SQLITE_BUSSY --> a SELECT statement isn't finished into another instance | |
| 368 | - sleep(100); | |
| 369 | - db_do_commit(db, result, log, retries - 1) | |
| 370 | - else | |
| 371 | - log(err); | |
| 372 | - if sql_query(db, "ROLLBACK") is | |
| 373 | - { | |
| 374 | - error(err2) then log(err2), // should never occure | |
| 375 | - ok(_) then unique | |
| 376 | - }; | |
| 377 | - error((err, success(result))), //error in the SQL request | |
| 378 | - ok(_) then | |
| 379 | - ok(result) | |
| 380 | - }. | |
| 381 | - | |
| 382 | - | |
| 383 | 355 | |
| 384 | 356 | /** |
| 385 | 357 | * Encaspulate a transaction. | ... | ... |
anubis_dev/library/predefined.anubis