1436
1437
1438
1439
1440
1441
1442
1443
1444
|
(result (or stmth
(let* ((newstmth (sqlite3:prepare db stmt)))
;; (db:hoh-set! stmt-cache db stmt newstmth)
(hash-table-set! stmt-cache stmt newstmth)
newstmth))))
(mutex-unlock! *get-cache-stmth-mutex*)
result))
)
|
>
>
>
>
>
>
>
>
>
>
|
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
|
(result (or stmth
(let* ((newstmth (sqlite3:prepare db stmt)))
;; (db:hoh-set! stmt-cache db stmt newstmth)
(hash-table-set! stmt-cache stmt newstmth)
newstmth))))
(mutex-unlock! *get-cache-stmth-mutex*)
result))
;;======================================================================
;; cached writes - run list of procs inside transaction
;; NOTE: this only works because we have once database per process
;;======================================================================
(define *cached-writes-mutex* (make-mutex))
(define *cached-writes-flag* #f)
(define *cached-writes-queues* (make-hash-table)) ;; dbstruct->list of writes
)
|