r9014: odbc backend now working on allegro and lispworks
[clsql.git] / base / package.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          package.lisp
6 ;;;; Purpose:       Package definition for base (low-level) SQL interface
7 ;;;; Programmers:   Kevin M. Rosenberg based on
8 ;;;;                Original code by Pierre R. Mai 
9 ;;;; Date Started:  Feb 2002
10 ;;;;
11 ;;;; $Id$
12 ;;;;
13 ;;;; This file, part of CLSQL, is Copyright (c) 2002-2004 by Kevin M. Rosenberg
14 ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
15 ;;;;
16 ;;;; CLSQL users are granted the rights to distribute and use this software
17 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
18 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
19 ;;;; *************************************************************************
20
21 (in-package #:cl-user)
22
23 ;;;; This file makes the required package definitions for CLSQL's
24 ;;;; core packages.
25
26 (eval-when (:compile-toplevel :load-toplevel :execute)
27 (defpackage #:clsql-base-sys
28   (:use #:cl)
29   (:export
30      ;; "Private" exports for use by interface packages
31      #:check-connection-spec
32      #:database-type-load-foreign
33      #:database-type-library-loaded ;; KMR - Tests if foreign library okay
34      #:database-initialize-database-type
35      #:database-connect
36      #:database-disconnect
37      #:database-reconnect
38      #:database-query
39      #:database-execute-command
40      #:database-query-result-set
41      #:database-dump-result-set
42      #:database-store-next-row
43      #:database-create
44      #:database-destroy
45      #:database-probe
46      #:database-describe-table
47      
48      #:database-list-tables
49      #:database-list-attributes
50      #:database-attribute-type
51      #:database-create-sequence 
52      #:database-drop-sequence
53      #:database-sequence-next
54      #:sql-escape
55      #:database-sequence-last
56      #:database-set-sequence-position
57      #:database-list-attributes
58      #:database-list-sequences
59      #:database-list-indexes
60      #:database-list-views
61      
62      
63      ;; Large objects (Marc B)
64      #:database-create-large-object
65      #:database-write-large-object
66      #:database-read-large-object
67      #:database-delete-large-object
68
69      #:command-output
70      #:make-process-lock
71      #:with-process-lock
72      #:connection-spec
73      #:ensure-keyword
74
75      ;; utils.lisp
76      #:without-interrupts
77      #:make-process-lock
78      #:with-process-lock
79      #:command-output
80
81      ;; Shared exports for re-export by CLSQL-BASE
82      .
83      #1=(#:clsql-condition
84          #:clsql-error
85          #:clsql-simple-error
86          #:clsql-warning
87          #:clsql-simple-warning
88          #:clsql-invalid-spec-error
89          #:clsql-invalid-spec-error-connection-spec
90          #:clsql-invalid-spec-error-database-type
91          #:clsql-invalid-spec-error-template
92          #:clsql-access-error
93          #:clsql-access-error-database-type
94          #:clsql-access-error-connection-spec
95          #:clsql-access-error-error
96          #:clsql-connect-error
97          #:clsql-connect-error-errno
98          #:clsql-sql-error
99          #:clsql-sql-error-database
100          #:clsql-sql-error-expression
101          #:clsql-sql-error-errno
102          #:clsql-sql-error-error
103          #:clsql-database-warning
104          #:clsql-database-warning-database
105          #:clsql-database-warning-message
106          #:clsql-exists-condition
107          #:clsql-exists-condition-new-db
108          #:clsql-exists-condition-old-db
109          #:clsql-exists-warning
110          #:clsql-exists-error
111          #:clsql-closed-error
112          #:clsql-closed-error-database
113          #:clsql-sql-syntax-error
114          #:clsql-type-error
115          #:clsql-odbc-error
116          #:clsql-odbc-error-message
117          
118          #:*loaded-database-types*
119          #:reload-database-types
120          #:*default-database-type*
121          #:*initialized-database-types*
122          #:initialize-database-type
123          #:*connect-if-exists*
124          #:*default-database*
125          #:connected-databases
126          #:database
127          #:database-name
128          #:find-database
129          #:database-name-from-spec
130          #:is-database-open
131
132          ;; accessors for database class
133          #:name
134          #:connection-spec
135          #:transaction
136          #:transaction-level
137          #:conn-pool
138          #:command-recording-stream
139          #:result-recording-stream
140          #:query-recording-stream
141          #:view-classes
142          #:database-type
143          #:database-state
144
145          ;; utils.lisp
146          #:number-to-sql-string
147          #:float-to-sql-string
148          #:sql-escape-quotes
149          
150          ;; time.lisp
151          #:bad-component
152          #:current-day
153          #:current-month
154          #:current-year
155          #:day-duration
156          #:db-timestring
157          #:decode-duration
158          #:decode-time
159          #:duration
160          #:duration+
161          #:duration<
162          #:duration<=
163          #:duration=
164          #:duration>
165          #:duration>=
166          #:duration-day
167          #:duration-hour
168          #:duration-minute
169          #:duration-month
170          #:duration-second
171          #:duration-year
172          #:duration-reduce 
173          #:duration-timestring
174          #:extract-roman 
175          #:format-duration
176          #:format-time
177          #:get-time
178          #:interval-clear
179          #:interval-contained
180          #:interval-data
181          #:interval-edit
182          #:interval-end
183          #:interval-match
184          #:interval-push
185          #:interval-relation
186          #:interval-start
187          #:interval-type
188          #:make-duration
189          #:make-interval
190          #:make-time
191          #:merged-time
192          #:midnight
193          #:month-name
194          #:parse-date-time
195          #:parse-timestring
196          #:parse-yearstring
197          #:print-date
198          #:roll
199          #:roll-to
200          #:time
201          #:time+
202          #:time-
203          #:time-by-adding-duration
204          #:time-compare
205          #:time-difference
206          #:time-dow
207          #:time-element
208          #:time-max
209          #:time-min
210          #:time-mjd
211          #:time-msec
212          #:time-p
213          #:time-sec
214          #:time-well-formed
215          #:time-ymd
216          #:time<
217          #:time<=
218          #:time=
219          #:time>
220          #:time>=
221          #:timezone
222          #:universal-time
223          #:wall-time
224          #:wall-timestring
225          #:week-containing
226          #:gregorian-to-mjd
227          #:mjd-to-gregorian
228          x
229          ;; recording.lisp -- SQL I/O Recording 
230          #:record-sql-action
231          #:add-sql-stream                 ; recording  xx
232          #:delete-sql-stream              ; recording  xx
233          #:list-sql-streams               ; recording  xx
234          #:sql-recording-p                ; recording  xx
235          #:sql-stream                     ; recording  xx
236          #:start-sql-recording            ; recording  xx
237          #:stop-sql-recording             ; recording  xx
238
239          ;; database.lisp -- Connection
240          #:*default-database-type*                ; clsql-base xx
241          #:*default-database*             ; classes    xx
242          #:connect                                ; database   xx
243          #:*connect-if-exists*            ; database   xx
244          #:connected-databases            ; database   xx
245          #:database                       ; database   xx
246          #:database-name                     ; database   xx
247          #:disconnect                     ; database   xx
248          #:reconnect                         ; database
249          #:find-database                     ; database   xx
250          #:status                            ; database   xx
251          #:with-database
252          #:with-default-database
253          #:disconnect-pooled
254          #:create-database
255          #:destroy-database
256          #:probe-database
257
258          ;; basic-sql.lisp
259          #:query
260          #:execute-command
261          #:write-large-object
262          #:read-large-object
263          #:delete-large-object
264          #:do-query
265          #:map-query
266          #:describe-table
267
268          ;; Transactions
269          #:with-transaction
270          #:commit-transaction
271          #:rollback-transaction
272          #:add-transaction-commit-hook
273          #:add-transaction-rollback-hook
274          #:commit                            ; transact   xx
275          #:rollback                       ; transact   xx
276          #:with-transaction               ; transact   xx               .
277          #:start-transaction                 ; transact   xx
278          #:in-transaction-p                  ; transact   xx
279          #:database-start-transaction
280          #:database-abort-transaction
281          #:database-commit-transaction
282          #:transaction-level
283          #:transaction
284
285          ))
286     (:documentation "This is the INTERNAL SQL-Interface package of CLSQL-BASE."))
287
288 (defpackage #:clsql-base
289     (:import-from #:clsql-base-sys . #1#)
290     (:export . #1#)
291     (:documentation "This is the SQL-Interface package of CLSQL-BASE."))
292 );eval-when
293
294