cl-scopes/storage/storage.lisp

27 lines
529 B
Common Lisp

;;; cl-scopes/storage/storage.lisp
;;;; Common layer for SQL storage functionality.
(defpackage :scopes/storage
(:use :common-lisp)
(:export #:*db-config*
#:storage
#:drop-table))
(in-package :scopes/storage)
(defparameter *db-config* nil)
(defclass storage-factory ()
((params :initarg :params)
(config :initarg :config)))
(defclass storage ()
((factory :initarg :factory)
(db)
(schema)))
(defun drop-table (st tn)
st
(print (sxql:yield
(sxql:drop-table tn :if-exists t))))