r9009: add sequence fns
[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          
116          #:*loaded-database-types*
117          #:reload-database-types
118          #:*default-database-type*
119          #:*initialized-database-types*
120          #:initialize-database-type
121          #:*connect-if-exists*
122          #:*default-database*
123          #:connected-databases
124          #:database
125          #:database-name
126          #:find-database
127          #:database-name-from-spec
128          #:is-database-open
129
130          ;; accessors for database class
131          #:name
132          #:connection-spec
133          #:transaction
134          #:transaction-level
135          #:conn-pool
136          #:command-recording-stream
137          #:result-recording-stream
138          #:query-recording-stream
139          #:view-classes
140          #:database-type
141          #:database-state
142
143          ;; utils.lisp
144          #:number-to-sql-string
145          #:float-to-sql-string
146          #:sql-escape-quotes
147          
148          ;; time.lisp
149          #:bad-component
150          #:current-day
151          #:current-month
152          #:current-year
153          #:day-duration
154          #:db-timestring
155          #:decode-duration
156          #:decode-time
157          #:duration
158          #:duration+
159          #:duration<
160          #:duration<=
161          #:duration=
162          #:duration>
163          #:duration>=
164          #:duration-day
165          #:duration-hour
166          #:duration-minute
167          #:duration-month
168          #:duration-second
169          #:duration-year
170          #:duration-reduce 
171          #:duration-timestring
172          #:extract-roman 
173          #:format-duration
174          #:format-time
175          #:get-time
176          #:interval-clear
177          #:interval-contained
178          #:interval-data
179          #:interval-edit
180          #:interval-end
181          #:interval-match
182          #:interval-push
183          #:interval-relation
184          #:interval-start
185          #:interval-type
186          #:make-duration
187          #:make-interval
188          #:make-time
189          #:merged-time
190          #:midnight
191          #:month-name
192          #:parse-date-time
193          #:parse-timestring
194          #:parse-yearstring
195          #:print-date
196          #:roll
197          #:roll-to
198          #:time
199          #:time+
200          #:time-
201          #:time-by-adding-duration
202          #:time-compare
203          #:time-difference
204          #:time-dow
205          #:time-element
206          #:time-max
207          #:time-min
208          #:time-mjd
209          #:time-msec
210          #:time-p
211          #:time-sec
212          #:time-well-formed
213          #:time-ymd
214          #:time<
215          #:time<=
216          #:time=
217          #:time>
218          #:time>=
219          #:timezone
220          #:universal-time
221          #:wall-time
222          #:wall-timestring
223          #:week-containing
224          #:gregorian-to-mjd
225          #:mjd-to-gregorian
226          x
227          ;; recording.lisp -- SQL I/O Recording 
228          #:record-sql-action
229          #:add-sql-stream                 ; recording  xx
230          #:delete-sql-stream              ; recording  xx
231          #:list-sql-streams               ; recording  xx
232          #:sql-recording-p                ; recording  xx
233          #:sql-stream                     ; recording  xx
234          #:start-sql-recording            ; recording  xx
235          #:stop-sql-recording             ; recording  xx
236
237          ;; database.lisp -- Connection
238          #:*default-database-type*                ; clsql-base xx
239          #:*default-database*             ; classes    xx
240          #:connect                                ; database   xx
241          #:*connect-if-exists*            ; database   xx
242          #:connected-databases            ; database   xx
243          #:database                       ; database   xx
244          #:database-name                     ; database   xx
245          #:disconnect                     ; database   xx
246          #:reconnect                         ; database
247          #:find-database                     ; database   xx
248          #:status                            ; database   xx
249          #:with-database
250          #:with-default-database
251          #:disconnect-pooled
252          #:create-database
253          #:destroy-database
254          #:probe-database
255
256          ;; basic-sql.lisp
257          #:query
258          #:execute-command
259          #:write-large-object
260          #:read-large-object
261          #:delete-large-object
262          #:do-query
263          #:map-query
264          #:describe-table
265
266          ;; Transactions
267          #:with-transaction
268          #:commit-transaction
269          #:rollback-transaction
270          #:add-transaction-commit-hook
271          #:add-transaction-rollback-hook
272          #:commit                            ; transact   xx
273          #:rollback                       ; transact   xx
274          #:with-transaction               ; transact   xx               .
275          #:start-transaction                 ; transact   xx
276          #:in-transaction-p                  ; transact   xx
277          #:database-start-transaction
278          #:database-abort-transaction
279          #:database-commit-transaction
280          #:transaction-level
281          #:transaction
282
283          ))
284     (:documentation "This is the INTERNAL SQL-Interface package of CLSQL-BASE."))
285
286 (defpackage #:clsql-base
287     (:import-from #:clsql-base-sys . #1#)
288     (:export . #1#)
289     (:documentation "This is the SQL-Interface package of CLSQL-BASE."))
290 );eval-when
291
292