X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=classic%2Fsql.lisp;h=36a11963ff6af6782fdd081ab19fdc9eb48296d8;hb=a6576bcf62dd1e710085ec74089d0730d599001b;hp=c207a8f52221b11de881e0fe543a98e68b025742;hpb=39d3fefaebf35a19a211d1ab6552d7ff54faccd2;p=clsql.git diff --git a/classic/sql.lisp b/classic/sql.lisp index c207a8f..36a1196 100644 --- a/classic/sql.lisp +++ b/classic/sql.lisp @@ -17,7 +17,7 @@ ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* -(in-package #:clsql-sys) +(in-package #:clsql-classic) ;;; Row processing macro @@ -90,22 +90,37 @@ (lisp->sql-name (cadr o)))))) -;;; Marc Battyani : Large objects support -(defun create-large-object (&key (database *default-database*)) - "Creates a new large object in the database and returns the object identifier" - (database-create-large-object database)) +;;; These functions are not exported. If you application depends on these +;;; functions consider using the clsql package using has further support. -(defun write-large-object (object-id data &key (database *default-database*)) - "Writes data to the large object" - (database-write-large-object object-id data database)) +(defun list-tables (&key (database *default-database*)) + "List all tables in *default-database*, or if the :database keyword arg +is given, the specified database. If the keyword arg :system-tables +is true, then it will not filter out non-user tables. Table names are +given back as a list of strings." + (database-list-tables database)) -(defun read-large-object (object-id &key (database *default-database*)) - "Reads the large object content" - (database-read-large-object object-id database)) -(defun delete-large-object (object-id &key (database *default-database*)) - "Deletes the large object in the database" - (database-delete-large-object object-id database)) +(defun list-attributes (table &key (database *default-database*)) + "List the attributes of TABLE in *default-database, or if the +:database keyword is given, the specified database. Attributes are +returned as a list of strings." + (database-list-attributes table database)) + +(defun attribute-type (attribute table &key (database *default-database*)) + "Return the field type of the ATTRIBUTE in TABLE. The optional +keyword argument :database specifies the database to query, defaulting +to *default-database*." + (database-attribute-type attribute table database)) + +(defun create-sequence (name &key (database *default-database*)) + (database-create-sequence name database)) + +(defun drop-sequence (name &key (database *default-database*)) + (database-drop-sequence name database)) + +(defun sequence-next (name &key (database *default-database*)) + (database-sequence-next name database))