;;;; in Text, HTML, and XML formats. This includes hyperlinking
;;;; capability and sub-objects.
;;;;
-;;;; $Id: mop.lisp,v 1.3 2002/11/29 23:14:31 kevin Exp $
+;;;; $Id: mop.lisp,v 1.4 2002/12/01 21:07:28 kevin Exp $
;;;;
;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
;;;;
:documentation "Class description")
(version :initarg :version :initform nil
:documentation "Version number for class")
+ (sql-name :initarg :table-name :initform nil :reader sql-name)
;;; The remainder of these fields are calculated one time
;;; in finalize-inheritence.
(class-id :type integer :initform nil :documentation
"Unique ID for the class")
+ (create-table-cmd :initform nil :reader create-table-cmd)
+ (create-index-cmds :initform nil :reader create-index-cmds)
+ (drop-table-cmd :initform nil :reader drop-table-cmd)
+
(value-func :initform nil :type function)
(xmlvalue-func :initform nil :type function)
(fmtstr-text :initform nil :type string)
(otherwise
ho-type)))
+
+
+(defun ho-type-to-sql-type (sqltype)
+ (ecase sqltype
+ (:string
+ 'string)
+ (:fixnum
+ 'fixnum)
+ (:bigint
+ 'integer)
+ (:short-float
+ 'short-float)
+ (:long
+ 'long-float)
+ (:text
+ 'string)))
+
;;;; Class initialization function
(defun process-subobjects (cl)
"Initialize a hyperobject class. Calculates all class slots"
(process-subobjects cl)
(process-views cl)
+ (process-sql cl)
(process-documentation cl))