Blah?
parent
25239281b7
commit
284e3a951e
22
src/dodb.cl
22
src/dodb.cl
|
@ -106,6 +106,14 @@
|
|||
:hard nil)
|
||||
))
|
||||
|
||||
;(defun db/index/update (database index-name object file-name old-object)
|
||||
; (let* ((struct-name (db-struct-name database))
|
||||
; (new-value (get-object-attribute struct-name index-name object))
|
||||
; (old-value (get-object-attribute struct-name index-name old-object))
|
||||
; (symlink-path (db/index/get-symlink-path database index-name object)))
|
||||
; (if (not (equal new-value old-value))
|
||||
; ())))
|
||||
|
||||
(defun db/index/del (database index-name object)
|
||||
(delete-file (db/index/get-symlink-path database index-name object)))
|
||||
|
||||
|
@ -264,16 +272,20 @@
|
|||
; write object to temporary file
|
||||
(util:write-object-to-file object tmp-file-path)
|
||||
|
||||
; TODO: either remove the file or read the documentation on rename-file
|
||||
|
||||
; rename the temporary file
|
||||
(rename-file tmp-file-path file-basename)
|
||||
|
||||
; handle indexes
|
||||
(loop for index in (db-indexes database)
|
||||
do (db/index/new database index object file-basename))
|
||||
; (loop for index in (db-indexes database)
|
||||
; do (db/index/update database index object file-basename old-object))
|
||||
)
|
||||
)
|
||||
|
||||
; handle partitions
|
||||
(loop for partition in (db-partitions database)
|
||||
do (db/partition/new database partition object file-basename))))
|
||||
; ; handle partitions
|
||||
; (loop for partition in (db-partitions database)
|
||||
; do (db/partition/update database partition object file-basename))))
|
||||
|
||||
;
|
||||
; TEST SCENARIO
|
||||
|
|
Loading…
Reference in New Issue