sqlite-utils.scm
(module sqlite-utils mzscheme
  (provide update table-exists?)
  
  (require (planet "sqlite.ss" ("jaymccarthy" "sqlite.plt"))
           "sql.scm")

;;; UTILITIES

  (define (update db sql)
    (let ([statement (prepare db sql)])
      (begin0
        (run statement)
        (finalize statement))))
  
  (define (table-exists? db table-name)
    (not (null? (select db (sql (SELECT (*) FROM sqlite_master WHERE (= name ,table-name)))))))
  
  )