X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Ftable.lisp;h=dd5ccb95726549bb1c60adc8faf27e7e6fbdde2c;hb=3ec4277531c7c19b1cffade823d3e2e3f928ceb3;hp=4fb91685eff5e690b08ca954e33d3bab4c9d4f7b;hpb=150e23be29d88d99e4114a8cff017b3cce005e10;p=clsql.git diff --git a/sql/table.lisp b/sql/table.lisp index 4fb9168..dd5ccb9 100644 --- a/sql/table.lisp +++ b/sql/table.lisp @@ -173,6 +173,8 @@ specification of a table to drop the index from." (unless (index-exists-p index-name :database database) (return-from drop-index))) (:error t)) + (unless (db-use-column-on-drop-index? (database-underlying-type database)) + (setq on nil)) (execute-command (format nil "DROP INDEX ~A~A" index-name (if (null on) "" (concatenate 'string " ON " @@ -185,6 +187,15 @@ specification of a table to drop the index from." OWNER is a string, this denotes a username and only indexs owned by OWNER are considered. Index names are returned as a list of strings." (database-list-indexes database :owner owner)) + +(defun list-table-indexes (table &key (owner nil) + (database *default-database*)) + "List all indexes in DATABASE for a TABLE, which defaults to +*default-database*. If OWNER is :all , all indexs are considered. If +OWNER is a string, this denotes a username and only indexs owned by +OWNER are considered. Index names are returned as a list of strings." + (database-list-table-indexes (database-identifier table) + database :owner owner)) (defun index-exists-p (name &key (owner nil) (database *default-database*)) "Test for existence of an index called NAME in DATABASE which