我定义了一个使用 Mito ORM 的类,插槽定义了一个:col-type
:
(isbn
:accessor isbn
:initarg :isbn
:col-type (or (:varchar 128) :null))
如何获得:col-type
定义?由于这是我的类定义中的一个插槽,是否没有通用的方法来访问它,比如slot-definition :col-type ...
?
在clos-mop 文档中,我只找到了如何访问
slot-definition-allocation
slot-definition-initargs
slot-definition-initform
slot-definition-initfunction
slot-definition-name
slot-definition-type
isbn 插槽显示如下:
#<MITO.DAO.COLUMN:DAO-TABLE-COLUMN-CLASS {1005928483}>
--------------------
Name: BOOKSHOPS.MODELS:ISBN
Init args: (:ISBN)
Init form: #<unspecified>
Init function: NIL
--------------------
Group slots by inheritance [ ]
Sort slots alphabetically [X]
All Slots:
[ ] %CLASS = #<DAO-TABLE-CLASS BOOK>
[ ] %DOCUMENTATION = NIL
[ ] %TYPE = T
[ ] ALLOCATION = :INSTANCE
[ ] ALLOCATION-CLASS = NIL
[ ] COL-TYPE = (OR (:VARCHAR 128) :NULL)
[ ] DEFLATE = #<unbound>
[ ] GHOST = NIL
[ ] INFLATE = #<unbound>
[ ] INITARGS = (:ISBN)
[ ] INITFORM = NIL
[ ] INITFUNCTION = NIL
[ ] NAME = BOOKSHOPS.MODELS:ISBN
[ ] PRIMARY-KEY = NIL
[ ] READERS = (BOOKSHOPS.MODELS:ISBN)
[ ] REFERENCES = NIL
[ ] WRITERS = ((SETF BOOKSHOPS.MODELS:ISBN))
谢谢。