r9457: Reworked CLSQL file structure.
[clsql.git] / sql / package.lisp
index 1a11f9493a7d57faa1faf85091856ba9858b3474..2a07e84490d45d129494c42d06e171a088619529 100644 (file)
      #:database-query-result-set
      #:database-dump-result-set
      #:database-store-next-row
-     #:database-get-type-specifier
      #:database-list-tables
+     #:database-list-tables-and-sequences
      #:database-table-exists-p
      #:database-list-views
      #:database-view-exists-p
      
      #:db-backend-has-create/destroy-db?
      #:db-type-has-views?
+     #:db-type-has-bigint?
+     #:db-type-has-union?
      #:db-type-has-subqueries?
      #:db-type-has-boolean-where?
      #:db-type-transaction-capable?
      #:db-type-default-case
      #:db-type-use-column-on-drop-index? 
      #:database-underlying-type
+     #:database-get-type-specifier
+     #:read-sql-value
+     #:database-output-sql-as-type
+     #:*loaded-database-types*
+     #:reload-database-types
+     #:is-database-open
 
      ;; Large objects 
      #:database-create-large-object
      #:database-type
      #:database-state
      #:attribute-cache
-     
-
+   
      ;; utils.lisp
      #:without-interrupts
      #:make-process-lock
      #:symbol-name-default-case
      #:convert-to-db-default-case
      #:ensure-keyword
-
-     
-     #:clsql-invalid-spec-error
-     #:clsql-invalid-spec-error-connection-spec
-     #:clsql-invalid-spec-error-database-type
-     #:clsql-invalid-spec-error-template
-     #:clsql-access-error
-     #:clsql-access-error-database-type
-     #:clsql-access-error-connection-spec
-     #:clsql-access-error-error
-     #:clsql-connect-error
-     #:clsql-connect-error-errno
-     #:clsql-sql-error
-     #:clsql-sql-error-database
-     #:clsql-sql-error-expression
-     #:clsql-sql-error-errno
-     #:clsql-sql-error-error
-     #:clsql-database-warning
-     #:clsql-database-warning-database
-     #:clsql-database-warning-message
-     #:clsql-exists-condition
-     #:clsql-exists-condition-new-db
-     #:clsql-exists-condition-old-db
-     #:clsql-exists-warning
-     #:clsql-exists-error
-     #:clsql-closed-error
-     #:clsql-closed-error-database
-     #:clsql-sql-syntax-error
-     #:clsql-type-error
-     #:clsql-odbc-error
-     #:clsql-odbc-error-message
-     
-     #:*loaded-database-types*
-     #:reload-database-types
-     #:*initialized-database-types*
-     #:initialize-database-type
-     #:*connect-if-exists*
-     #:*default-database*
-     #:connected-databases
-     #:database
-     #:find-database
-     #:is-database-open
-     #:database-type                     ; database   x
-
-     ;; utils.lisp
+     #:getenv
      #:number-to-sql-string
      #:float-to-sql-string
      #:sql-escape-quotes
      #:in
+
+     ;; Generic backends
+     #:generic-postgresql-database
+     #:generic-odbc-database
      
      .
+
      ;; Shared exports for re-export by CLSQL package. 
-     ;; I = Implemented, D = Documented
-     ;;  name                                 file       ID
-     ;;====================================================
-     #1=(;;------------------------------------------------
-        ;; CommonSQL API 
-        ;;------------------------------------------------
-        ;;FDML 
-       #:select                            ; objects    xx
-       #:cache-table-queries               ; 
-       #:*cache-table-queries-default*     ; 
-       #:delete-records                    ; sql        xx
-       #:insert-records                    ; sql        xx
-       #:update-records                    ; sql        xx
-       #:execute-command                   ; sql        xx
-       #:query                             ; sql        xx
-       #:print-query                       ; sql        xx
-       #:do-query                          ; sql        xx
-       #:map-query                         ; sql        xx
-       #:for-each-row
-       #:loop
+     #1=(
 
-       ;;FDDL
-       #:create-table                      ; table      xx
-       #:drop-table                        ; table      xx
-       #:list-tables                       ; table      xx
-       #:table-exists-p                    ; table      xx 
-       #:list-attributes                   ; table      xx
-       #:attribute-type                    ; table      xx
-       #:list-attribute-types             ; table      xx
-       #:*cache-table-queries-default*
-       #:create-view                       ; table      xx
-       #:drop-view                         ; table      xx
-       #:create-index                      ; table      xx             
-       #:drop-index                        ; table      xx             
-       #:truncate-database
-       ;;OODDL
-       #:standard-db-object                ; objects    xx
-       #:def-view-class                    ; objects    xx
-       #:create-view-from-class            ; objects    xx
-       #:drop-view-from-class              ; objects    xx
-       ;;OODML
-       #:instance-refreshed                ; objects    xx 
-       #:update-object-joins               ;
-       #:*default-update-objects-max-len*  ; 
-       #:update-slot-from-record          ; objects    xx
-       #:update-instance-from-records      ; objects    xx
-       #:update-records-from-instance      ; objects    xx
-       #:update-record-from-slot           ; objects    xx
-       #:update-record-from-slots          ; objects    xx
-       #:list-classes                      ; objects    xx
-       #:delete-instance-records           ; objects    xx
-       ;;Symbolic SQL Syntax 
-       #:sql                               ; syntax     xx
-       #:sql-expression                    ; syntax     xx
-       #:sql-operation                     ; syntax     xx
-       #:sql-operator                      ; syntax     xx     
-       #:disable-sql-reader-syntax         ; syntax     xx
-       #:enable-sql-reader-syntax          ; syntax     xx
-       #:locally-disable-sql-reader-syntax ; syntax     xx
-       #:locally-enable-sql-reader-syntax  ; syntax     xx
-       #:restore-sql-reader-syntax-state   ; syntax     xx
+        ;; Condition system (conditions.lisp) 
+        #:sql-user-error
+        #:sql-database-error
+        #:sql-database-data-error
+        #:sql-connection-error
+        #:sql-temporary-error
+         #:sql-timeout-error 
+         #:sql-fatal-error 
+        #:sql-error-error-id
+        #:sql-error-secondary-error-id
+        #:sql-error-database-message
+        ;; CLSQL Extensions
+        #:sql-condition
+        #:sql-error
+        #:sql-warning
+        #:sql-database-warning
+         #:*backend-warning-behavior*
 
-       ;;FDDL 
-       #:list-views                        ; table      xx
-       #:view-exists-p                     ; table      xx
-       #:list-indexes                      ; table      xx
-       #:list-table-indexes                ; table      xx
-       #:index-exists-p                    ; table      xx
-       #:create-sequence                   ; table      xx
-       #:drop-sequence                     ; table      xx
-       #:list-sequences                    ; table      xx
-       #:sequence-exists-p                 ; table      xx
-       #:sequence-next                     ; table      xx
-       #:sequence-last                     ; table      xx
-       #:set-sequence-position             ; table      xx
-       ;;OODDL
-       #:view-table                        ; metaclass  x
-       #:universal-time                   ; objects    xx 
-       #:bigint
-       ;;OODML
-       #:*db-auto-sync*                    ; objects    xx              
-       #:add-to-relation                   ; objects    x
-       #:remove-from-relation              ; objects    x
-       #:read-sql-value                    ; objects    x
-       #:database-output-sql-as-type       ; objects    x
-       #:database-get-type-specifier       ; objects    x
-       #:database-output-sql               ; sql/class  xx
+         ;; Connection/initialisation (base-classes.lisp, database.lisp, 
+         ;;   initialize.lisp)
+         #:*default-database-type*       
+         #:*default-database*           
+         #:*initialized-database-types*
+         #:initialize-database-type
+         #:connect                     
+         #:disconnect                 
+         #:*connect-if-exists*        
+         #:connected-databases        
+         #:database                   
+         #:database-name               
+         #:reconnect                   
+         #:find-database               
+         #:status                      
+         ;; CLSQL Extensions 
+         #:with-database
+         #:with-default-database
+         #:disconnect-pooled
+         #:list-databases
+         #:create-database
+         #:destroy-database
+         #:probe-database
+         #:truncate-database
 
-       ;; conditions
-       #:clsql-condition
-       #:clsql-error
-       #:clsql-simple-error
-       #:clsql-warning
-       #:clsql-simple-warning
+         ;; I/O Recording (recording.lisp) 
+         #:add-sql-stream             
+         #:delete-sql-stream         
+         #:list-sql-streams          
+         #:sql-recording-p           
+         #:sql-stream                  
+         #:start-sql-recording         
+         #:stop-sql-recording          
+         ;; CLSQL Extensions 
+         #:record-sql-command
+         #:record-sql-result
 
-       ;;-----------------------------------------------
-       ;; Symbolic Sql Syntax 
-       ;;-----------------------------------------------
-       #:sql-and-qualifier
-       #:sql-escape
-       #:sql-query
-       #:sql-object-query
-       #:sql-any
-       #:sql-all
-       #:sql-not
-       #:sql-union
-       #:sql-intersection
-       #:sql-minus
-       #:sql-group-by
-       #:sql-having
-       #:sql-null
-       #:sql-not-null
-       #:sql-exists
-       #:sql-*
-       #:sql-+
-       #:sql-/
-       #:sql-like
-       #:sql-uplike
-       #:sql-and
-       #:sql-or
-       #:sql-in
-       #:sql-||
-       #:sql-is
-       #:sql-=
-       #:sql-==
-       #:sql-<
-       #:sql->
-       #:sql->=
-       #:sql-<=
-       #:sql-count
-       #:sql-max
-       #:sql-min
-       #:sql-avg
-       #:sql-sum
-       #:sql-view-class
-       #:sql_slot-value
+        ;; FDDL (fddl.lisp) 
+        #:create-table                   
+        #:drop-table                     
+        #:list-tables                    
+        #:table-exists-p                 
+        #:list-attributes                
+        #:attribute-type                 
+        #:list-attribute-types           
+        #:*cache-table-queries-default*  
+        #:create-view                    
+        #:drop-view                      
+        #:create-index                   
+        #:drop-index                     
+         ;; CLSQL Extensions 
+         #:describe-table
+        #:list-views                  
+        #:view-exists-p               
+        #:list-indexes                
+        #:list-table-indexes          
+        #:index-exists-p              
+        #:create-sequence             
+        #:drop-sequence               
+        #:list-sequences              
+        #:sequence-exists-p           
+        #:sequence-next               
+        #:sequence-last               
+        #:set-sequence-position       
 
+         ;; FDML (fdml.lisp) 
+        #:select 
+        #:cache-table-queries     
+        #:*cache-table-queries-default*
+        #:delete-records               
+        #:insert-records               
+        #:update-records               
+        #:execute-command              
+        #:query                        
+        #:print-query                  
+        #:do-query                     
+        #:map-query                    
+        #:loop
+         ;; CLSQL Extensions 
+         #:for-each-row
 
+         ;; Transaction handling (transaction.lisp) 
+         #:with-transaction
+         #:commit                        
+         #:rollback                     
+         ;; CLSQL Extensions 
+         #:commit-transaction
+         #:rollback-transaction
+         #:add-transaction-commit-hook
+         #:add-transaction-rollback-hook
+         #:start-transaction             
+         #:in-transaction-p              
+         #:database-start-transaction
+         #:database-abort-transaction
+         #:database-commit-transaction
+         #:transaction-level
+         #:transaction
 
-       ;; time.lisp
-       #:bad-component
-       #:current-day
-     #:current-month
-     #:current-year
-     #:day-duration
-     #:db-timestring
-     #:decode-duration
-     #:decode-time
-     #:duration
-     #:duration+
-     #:duration<
-     #:duration<=
-     #:duration=
-     #:duration>
-     #:duration>=
-     #:duration-day
-     #:duration-hour
-     #:duration-minute
-     #:duration-month
-     #:duration-second
-     #:duration-year
-     #:duration-reduce 
-     #:duration-timestring
-     #:extract-roman 
-     #:format-duration
-     #:format-time
-     #:get-time
-     #:utime->time
-     #:interval-clear
-     #:interval-contained
-     #:interval-data
-     #:interval-edit
-     #:interval-end
-     #:interval-match
-     #:interval-push
-     #:interval-relation
-     #:interval-start
-     #:interval-type
-     #:make-duration
-     #:make-interval
-     #:make-time
-     #:merged-time
-     #:midnight
-     #:month-name
-     #:parse-date-time
-     #:parse-timestring
-     #:parse-yearstring
-     #:print-date
-     #:roll
-     #:roll-to
-     #:time
-     #:time+
-     #:time-
-     #:time-by-adding-duration
-     #:time-compare
-     #:time-difference
-     #:time-dow
-     #:time-element
-     #:time-max
-     #:time-min
-     #:time-mjd
-     #:time-msec
-     #:time-p
-     #:time-sec
-     #:time-well-formed
-     #:time-ymd
-     #:time<
-     #:time<=
-     #:time=
-     #:time>
-     #:time>=
-     #:timezone
-     #:universal-time
-     #:wall-time
-     #:wall-timestring
-     #:week-containing
-     #:gregorian-to-mjd
-     #:mjd-to-gregorian
+        ;;  OODDL (ooddl.lisp) 
+        #:standard-db-object               
+        #:def-view-class                   
+        #:create-view-from-class           
+        #:drop-view-from-class             
+        #:list-classes                     
+        #:universal-time    
+         ;; CLSQL Extensions 
+        #:view-table        
+        #:bigint
 
-     ;; recording.lisp -- SQL I/O Recording 
-     #:record-sql-command
-     #:record-sql-result
-     #:add-sql-stream                 ; recording  xx
-     #:delete-sql-stream                 ; recording  xx
-     #:list-sql-streams                  ; recording  xx
-     #:sql-recording-p           ; recording  xx
-     #:sql-stream                        ; recording  xx
-     #:start-sql-recording               ; recording  xx
-     #:stop-sql-recording                ; recording  xx
+        ;; OODML (oodml.lisp) 
+        #:instance-refreshed               
+        #:update-objects-joins             
+        #:*default-update-objects-max-len* 
+        #:update-slot-from-record          
+        #:update-instance-from-records     
+        #:update-records-from-instance     
+        #:update-record-from-slot          
+        #:update-record-from-slots         
+        #:delete-instance-records          
+        ;; CLSQL Extensions 
+        #:*db-auto-sync*    
 
-     ;; database.lisp -- Connection
-     #:*default-database-type*           ; clsql-base xx
-     #:*default-database*                ; classes    xx
-     #:connect                           ; database   xx
-     #:*connect-if-exists*               ; database   xx
-     #:connected-databases               ; database   xx
-     #:database                          ; database   xx
-     #:database-name                     ; database   xx
-     #:disconnect                        ; database   xx
-     #:reconnect                         ; database
-     #:find-database                     ; database   xx
-     #:status                            ; database   xx
-     #:with-database
-     #:with-default-database
-     #:disconnect-pooled
-     #:create-database
-     #:destroy-database
-     #:probe-database
-     #:list-databases
-     
-     #:describe-table
-     #:*backend-warning-behavior*
-     
-     ;; Transactions
-     #:with-transaction
-     #:commit-transaction
-     #:rollback-transaction
-     #:add-transaction-commit-hook
-     #:add-transaction-rollback-hook
-     #:commit                            ; transact   xx
-     #:rollback                          ; transact   xx
-     #:with-transaction                  ; transact   xx               .
-     #:start-transaction                 ; transact   xx
-     #:in-transaction-p                  ; transact   xx
-     #:database-start-transaction
-     #:database-abort-transaction
-     #:database-commit-transaction
-     #:transaction-level
-     #:transaction
-       ))
-  (:documentation "This is the INTERNAL SQL-Interface package of CLSQL."))
+        ;; Symbolic SQL Syntax (syntax.lisp) 
+        #:sql                              
+        #:sql-expression                   
+        #:sql-operation                    
+        #:sql-operator                     
+        #:disable-sql-reader-syntax        
+        #:enable-sql-reader-syntax         
+        #:locally-disable-sql-reader-syntax
+        #:locally-enable-sql-reader-syntax 
+        #:restore-sql-reader-syntax-state  
+        
+        ;; SQL operations (operations.lisp) 
+        #:sql-query
+        #:sql-object-query
+        #:sql-any
+         #:sql-some 
+        #:sql-all
+        #:sql-not
+        #:sql-union
+        #:sql-intersect
+        #:sql-minus
+         #:sql-except 
+         #:sql-order-by 
+        #:sql-null
+        #:sql-*
+        #:sql-+
+        #:sql-/
+         #:sql--
+        #:sql-like
+        #:sql-and
+        #:sql-or
+        #:sql-in
+        #:sql-concat
+         #:sql-substr 
+        #:sql-=
+        #:sql-<
+         #:sql->
+         #:sql->=
+         #:sql-<=
+         #:sql-<>
+         #:sql-count
+         #:sql-max
+         #:sql-min
+         #:sql-avg
+         #:sql-sum
+         #:sql-function 
+         #:sql-between 
+         #:sql-distinct 
+         #:sql-nvl 
+         #:sql-slot-value
+         ;; CLSQL Extensions 
+         #:sql-limit 
+        #:sql-group-by
+        #:sql-having
+        #:sql-not-null
+        #:sql-exists
+        #:sql-uplike
+        #:sql-is
+        #:sql-==
+         #:sql-the 
+         #:sql-coalesce 
+         #:sql-view-class
+
+         ;; Time handling (time.lisp) 
+         #:bad-component
+         #:current-day
+         #:current-month
+         #:current-year
+         #:day-duration
+         #:db-timestring
+         #:decode-duration
+         #:decode-time
+         #:duration
+         #:duration+
+         #:duration<
+         #:duration<=
+         #:duration=
+         #:duration>
+         #:duration>=
+         #:duration-day
+         #:duration-hour
+         #:duration-minute
+         #:duration-month
+         #:duration-second
+         #:duration-year
+         #:duration-reduce 
+         #:duration-timestring
+         #:extract-roman 
+         #:format-duration
+         #:format-time
+         #:get-time
+         #:utime->time
+         #:interval-clear
+         #:interval-contained
+         #:interval-data
+         #:interval-edit
+         #:interval-end
+         #:interval-match
+         #:interval-push
+         #:interval-relation
+         #:interval-start
+         #:interval-type
+         #:make-duration
+         #:make-interval
+         #:make-time
+         #:merged-time
+         #:midnight
+         #:month-name
+         #:parse-date-time
+         #:parse-timestring
+         #:parse-yearstring
+         #:print-date
+         #:roll
+         #:roll-to
+         #:time
+         #:time+
+         #:time-
+         #:time-by-adding-duration
+         #:time-compare
+         #:time-difference
+         #:time-dow
+         #:time-element
+         #:time-max
+         #:time-min
+         #:time-mjd
+         #:time-msec
+         #:time-p
+         #:time-sec
+         #:time-well-formed
+         #:time-ymd
+         #:time<
+         #:time<=
+         #:time=
+         #:time>
+         #:time>=
+         #:timezone
+         #:universal-time
+         #:wall-time
+         #:wall-timestring
+         #:week-containing
+         #:gregorian-to-mjd
+         #:mjd-to-gregorian
+         ))
+    (:documentation "This is the INTERNAL SQL-Interface package of CLSQL."))
 
 
 (defpackage #:clsql