r9186: add attribute caching, improve inititialize-database-type
[clsql.git] / base / classes.lisp
index 32f48a7e4d07c3fc844a3f7c8b295a36ddaf6683..92254f501e9745c1d26689761d54471c1b179490 100644 (file)
@@ -26,8 +26,8 @@
    (connection-spec :initform nil :initarg :connection-spec
                     :reader connection-spec
                    :documentation "Require to use connection pool")
-   (database-type :initarg :database-type :reader database-type 
-                 :initform :unknown)
+   (database-type :initarg :database-type :initform :unknown
+                 :reader database-type)
    (state :initform :closed :reader database-state)
    (command-recording-stream :accessor command-recording-stream :initform nil)
    (result-recording-stream :accessor result-recording-stream :initform nil)
    (schema :accessor database-schema :initform nil)
    (transaction-level :initform 0 :accessor transaction-level)
    (transaction :initform nil :accessor transaction)
-   (conn-pool :initform nil :initarg :conn-pool :accessor conn-pool))
+   (conn-pool :initform nil :initarg :conn-pool :accessor conn-pool)
+   (attribute-cache :initform (make-hash-table :size 100 :test 'equal) 
+                   :accessor attribute-cache
+                   :documentation "Internal cache of table attributes. It is keyed by table-name. Values
+are a list of ACTION specified for table and any cached value of list-attributes-types."))
   (:documentation
    "This class is the supertype of all databases handled by CLSQL."))