r2006: debian
[clsql.git] / sql / package.cl
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          package.cl
6 ;;;; Purpose:       Package definition for high-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: package.cl,v 1.14 2002/05/11 22:37:46 kevin Exp $
12 ;;;;
13 ;;;; This file, part of CLSQL, is Copyright (c) 2002 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 (declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
22 (in-package :cl-user)
23
24 ;;;; This file makes the required package definitions for CLSQL's
25 ;;;; core packages.
26
27 (eval-when (:compile-toplevel :load-toplevel :execute)
28 (defpackage :clsql-sys
29   (:use :common-lisp)
30   (:export
31      ;; "Private" exports for use by interface packages
32      #:check-connection-spec
33      #:database-type-load-foreign
34      #:database-type-library-loaded ;; KMR - Tests if foreign library okay
35      #:database-initialize-database-type
36      #:database-connect
37      #:database-disconnect
38      #:database-query
39      #:database-execute-command
40      #:database-query-result-set
41      #:database-dump-result-set
42      #:database-store-next-row
43      
44      ;; For UncommonSQL support
45      #:database-list-tables
46      #:database-list-attributes
47      #:database-attribute-type
48      #:database-create-sequence 
49      #:database-drop-sequence
50      #:database-sequence-next
51      #:sql-escape
52
53      ;; Support for pooled connections
54      #:database-type
55
56      ;; Large objects (Marc B)
57      #:database-create-large-object
58      #:database-write-large-object
59      #:database-read-large-object
60      #:database-delete-large-object
61      
62      ;; Shared exports for re-export by CLSQL
63
64      .
65      #1=(#:clsql-condition
66          #:clsql-error
67          #:clsql-simple-error
68          #:clsql-warning
69          #:clsql-simple-warning
70          #:clsql-invalid-spec-error
71          #:clsql-invalid-spec-error-connection-spec
72          #:clsql-invalid-spec-error-database-type
73          #:clsql-invalid-spec-error-template
74          #:clsql-connect-error
75          #:clsql-connect-error-database-type
76          #:clsql-connect-error-connection-spec
77          #:clsql-connect-error-errno
78          #:clsql-connect-error-error
79          #:clsql-sql-error
80          #:clsql-sql-error-database
81          #:clsql-sql-error-expression
82          #:clsql-sql-error-errno
83          #:clsql-sql-error-error
84          #:clsql-database-warning
85          #:clsql-database-warning-database
86          #:clsql-database-warning-message
87          #:clsql-exists-condition
88          #:clsql-exists-condition-new-db
89          #:clsql-exists-condition-old-db
90          #:clsql-exists-warning
91          #:clsql-exists-error
92          #:clsql-closed-error
93          #:clsql-closed-error-database
94          #:*loaded-database-types*
95          #:reload-database-types
96          #:*default-database-type*
97          #:*initialized-database-types*
98          #:initialize-database-type
99          #:*connect-if-exists*
100          #:*default-database*
101          #:connected-databases
102          #:database
103          #:database-name
104          #:closed-database
105          #:find-database
106          #:database-name-from-spec
107          #:connect
108          #:disconnect
109          #:query
110          #:execute-command
111          #:map-query
112          #:do-query
113
114          ;; functional.cl
115          #:insert-records
116          #:delete-records
117          #:update-records
118          #:with-database
119          
120          ;; utils.cl
121          #:number-to-sql-string
122          #:float-to-sql-string
123          #:sql-escape-quotes
124
125          ;; For UncommonSQL support
126          #:sql-ident
127          #:list-tables
128          #:list-attributes
129          #:attribute-type
130          #:create-sequence 
131          #:drop-sequence
132          #:sequence-next
133
134          ;; Pooled connections
135          #:disconnect-pooled
136
137          ;; Transactions
138          #:with-transaction
139          #:commit-transaction
140          #:rollback-transaction
141          #:add-transaction-commit-hook
142          #:add-transaction-rollback-hook
143
144          ;; Large objects (Marc B)
145          #:create-large-object
146          #:write-large-object
147          #:read-large-object
148          #:delete-large-object
149          ))
150     (:documentation "This is the INTERNAL SQL-Interface package of CLSQL."))
151
152 (defpackage #:clsql
153     (:import-from #:clsql-sys . #1#)
154     (:export . #1#)
155     (:documentation "This is the SQL-Interface package of CLSQL."))
156 );eval-when
157
158 (defpackage #:clsql-user
159     (:use #:common-lisp #:clsql)
160     (:documentation "This is the user package for experimenting with CLSQL."))