X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql.lisp;h=e4faaa00ea3a61c2eefc8984bfc8f5e61f9391b9;hb=4675e305339bd8b9f4cc15eb5f2da6036907a301;hp=db984426eba2c1a14980cdcf729abd2b5eb84c81;hpb=eacffdb7123d5a9a0563769b1f663ac5681f4c3f;p=hyperobject.git diff --git a/sql.lisp b/sql.lisp index db98442..e4faaa0 100644 --- a/sql.lisp +++ b/sql.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: sql.lisp,v 1.2 2003/01/17 19:16:28 kevin Exp $ +;;;; $Id: sql.lisp,v 1.4 2003/03/29 04:10:44 kevin Exp $ ;;;; ;;;; This file, part of Hyperobject-SQL, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -36,6 +36,9 @@ (define-inverse cl esd)))) ) +(defgeneric sql-name (cl) + ) + (defmethod sql-name ((cl hyperobject-class)) "Return name of SQL table for a class" (let* ((sql-name-slot (slot-value cl 'sql-name)) @@ -151,13 +154,15 @@ SQL name" ;;;; Runtime Commands +(defgeneric sql-create (cl)) (defmethod sql-create (cl) - (with-sql-connection (conn) + (with-sql-connection (conn) (sql-execute (slot-value cl 'create-table-cmd) conn) (dolist (cmd (slot-value cl 'create-indices-cmds)) (sql-execute cmd conn)) (values))) +(defgeneric sql-drop (cl)) (defmethod sql-drop (cl) (mutex-sql-execute (slot-value cl 'drop-table-cmd)) (values))