r1798: Initial support for pooled connections
[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.8 2002/04/27 20:58:11 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
28 (eval-when (:compile-toplevel :load-toplevel :execute)
29 (defpackage :clsql-sys
30   (:use :common-lisp)
31   (:export
32      ;; "Private" exports for use by interface packages
33      #:check-connection-spec
34      #:database-type-load-foreign
35      #:database-type-library-loaded ;; KMR - Tests if foreign library okay
36      #:database-initialize-database-type
37      #:database-connect
38      #:database-disconnect
39      #:database-query
40      #:database-execute-command
41      #:database-query-result-set
42      #:database-dump-result-set
43      #:database-store-next-row
44      
45      ;; For UncommonSQL support
46      #:database-list-tables
47      #:database-list-attributes
48      #:database-attribute-type
49      #:database-create-sequence 
50      #:database-drop-sequence
51      #:database-sequence-next
52     
53      #:sql-escape
54      
55      ;; Large objects (Marc B)
56      #:database-create-large-object
57      #:database-write-large-object
58      #:database-read-large-object
59      #:database-delete-large-object
60      
61      ;; Pooled connections
62      #:disconnect-pooled
63      
64      ;; Shared exports for re-export by CLSQL
65      .
66      #1=(#:clsql-condition
67          #:clsql-error
68          #:clsql-simple-error
69          #:clsql-warning
70          #:clsql-simple-warning
71          #:clsql-invalid-spec-error
72          #:clsql-invalid-spec-error-connection-spec
73          #:clsql-invalid-spec-error-database-type
74          #:clsql-invalid-spec-error-template
75          #:clsql-connect-error
76          #:clsql-connect-error-database-type
77          #:clsql-connect-error-connection-spec
78          #:clsql-connect-error-errno
79          #:clsql-connect-error-error
80          #:clsql-sql-error
81          #:clsql-sql-error-database
82          #:clsql-sql-error-expression
83          #:clsql-sql-error-errno
84          #:clsql-sql-error-error
85          #:clsql-database-warning
86          #:clsql-database-warning-database
87          #:clsql-database-warning-message
88          #:clsql-exists-condition
89          #:clsql-exists-condition-new-db
90          #:clsql-exists-condition-old-db
91          #:clsql-exists-warning
92          #:clsql-exists-error
93          #:clsql-closed-error
94          #:clsql-closed-error-database
95          #:*loaded-database-types*
96          #:reload-database-types
97          #:*default-database-type*
98          #:*initialized-database-types*
99          #:initialize-database-type
100          #:*connect-if-exists*
101          #:*default-database*
102          #:connected-databases
103          #:database
104          #:database-name
105          #:closed-database
106          #:find-database
107          #:database-name-from-spec
108          #:connect
109          #:disconnect
110          #:query
111          #:execute-command
112          #:map-query
113          #:do-query
114
115          ;; functional.cl
116
117          #:insert-records
118          #:delete-records
119          #:update-records
120          #:with-database
121          
122          ;; utils.cl
123          #:number-to-sql-string
124          #:float-to-sql-string
125          #:sql-escape-quotes
126          
127          ;; For UncommonSQL support
128          #:sql-ident
129          #:list-tables
130          #:list-attributes
131          #:attribute-type
132          #:create-sequence 
133          #:drop-sequence
134          #:sequence-next
135          
136          ;; Large objects (Marc B)
137          #:create-large-object
138          #:write-large-object
139          #:read-large-object
140          #:delete-large-object
141          ))
142     (:documentation "This is the INTERNAL SQL-Interface package of CLSQL."))
143
144 (defpackage #:clsql
145     (:import-from #:clsql-sys . #1#)
146     (:export . #1#)
147     (:documentation "This is the SQL-Interface package of CLSQL."))
148 );eval-when
149
150 (defpackage #:clsql-user
151     (:use #:common-lisp #:clsql)
152     (:documentation "This is the user package for experimenting with CLSQL."))