From 284e3a951e4aa88bab996b3419d7044992f90a21 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Fri, 14 Oct 2022 20:26:54 +0200 Subject: [PATCH] Blah? --- src/dodb.cl | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/dodb.cl b/src/dodb.cl index deaf845..461c642 100644 --- a/src/dodb.cl +++ b/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