An object attribute can now be a symbol.
parent
09fb2b7cf4
commit
98793adf63
16
src/dodb.cl
16
src/dodb.cl
|
@ -82,12 +82,20 @@
|
|||
(concatenate 'string dbpath "/data/" (number->filename number)))
|
||||
|
||||
; Example: returns "./storage/cars/indexes/by_name/".
|
||||
(defun db/index/get-directory-path (database name)
|
||||
(concatenate 'string (db-path database) "/indexes/by_" name "/" ))
|
||||
(defun db/index/get-directory-path (database object-attribute)
|
||||
(let ((name (typecase object-attribute
|
||||
(string object-attribute)
|
||||
(symbol (symbol-name object-attribute))))
|
||||
(dbpath (db-path database)))
|
||||
(concatenate 'string dbpath "/indexes/by_" name "/")))
|
||||
|
||||
; Example: returns "./storage/cars/partitions/by_color/Red/".
|
||||
(defun db/partition/get-directory-path (database name value)
|
||||
(concatenate 'string (db-path database) "/partitions/by_" name "/" value "/"))
|
||||
(defun db/partition/get-directory-path (database name object-attribute)
|
||||
(let ((value (typecase object-attribute
|
||||
(string object-attribute)
|
||||
(symbol (symbol-name object-attribute))))
|
||||
(dbpath (db-path database)))
|
||||
(concatenate 'string dbpath "/partitions/by_" name "/" value "/")))
|
||||
|
||||
; Example: returns "Corvet".
|
||||
(defun db/index/get-filename (database index-name object)
|
||||
|
|
Loading…
Reference in New Issue