X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-odbc%2Fodbc-dbi.lisp;h=ff96c213b3ba113e635b4befd9bef4099a7037ca;hb=a9f57540c378329f627b5b3bd2a2991689638331;hp=9ebbaad5bb1499bb03ebbc0c89cff882734c1405;hpb=af6f86714c42fb34e4d914136cf18f336fc2460e;p=clsql.git diff --git a/db-odbc/odbc-dbi.lisp b/db-odbc/odbc-dbi.lisp index 9ebbaad..ff96c21 100644 --- a/db-odbc/odbc-dbi.lisp +++ b/db-odbc/odbc-dbi.lisp @@ -30,6 +30,7 @@ #:disconnect #:end-transaction #:fetch-row + #:list-all-data-sources #:list-all-database-tables #:list-all-table-columns #:loop-over-results @@ -183,6 +184,12 @@ the query against." )) (declare (ignore hstmt)) (db-describe-columns db "" "" table "")) +(defun list-all-data-sources () + (let ((db (make-instance 'odbc-db))) + (unless (henv db) ;; has class allocation! + (setf (henv db) (%new-environment-handle))) + (%list-data-sources (henv db)))) + (defun rr-sql (hstmt sql-statement &key db) (declare (ignore hstmt sql-statement db)) (warn "rr-sql not implemented.")) @@ -428,7 +435,7 @@ This makes the functions db-execute-command and db-query thread safe." (dotimes (col-nr count) (let ((data-ptr (aref column-data-ptrs col-nr)) (out-len-ptr (aref column-out-len-ptrs col-nr))) - ;; free-statment unbind frees theses + ;; free-statment :unbind frees these #+ignore (when data-ptr (uffi:free-foreign-object data-ptr)) #+ignore (when out-len-ptr (uffi:free-foreign-object out-len-ptr))))) (cond ((null hstmt)