r3129: dtc patches
[clsql.git] / sql / package.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          package.cl
6 ;;;; Purpose:       Package definition for CLSQL (high-level) interface
7 ;;;; Programmers:   Kevin M. Rosenberg based on
8 ;;;;                Original code by Pierre R. Mai 
9 ;;;; Date Started:  Feb 2002
10 ;;;;
11 ;;;; $Id: package.lisp,v 1.2 2002/10/21 07:45:50 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
25 (eval-when (:compile-toplevel :load-toplevel :execute)
26   (defpackage :clsql-sys
27     (:nicknames :clsql)
28     (:use :common-lisp :clsql-base-sys)
29     #+scl (:import-from :thread #:make-lock #:with-lock-held)
30     (:import-from 
31      :clsql-base
32      .
33      #1=(
34          #:clsql-condition
35          #:clsql-error
36          #:clsql-simple-error
37          #:clsql-warning
38          #:clsql-simple-warning
39          #:clsql-invalid-spec-error
40          #:clsql-invalid-spec-error-connection-spec
41          #:clsql-invalid-spec-error-database-type
42          #:clsql-invalid-spec-error-template
43          #:clsql-connect-error
44          #:clsql-connect-error-database-type
45          #:clsql-connect-error-connection-spec
46          #:clsql-connect-error-errno
47          #:clsql-connect-error-error
48          #:clsql-sql-error
49          #:clsql-sql-error-database
50          #:clsql-sql-error-expression
51          #:clsql-sql-error-errno
52          #:clsql-sql-error-error
53          #:clsql-database-warning
54          #:clsql-database-warning-database
55          #:clsql-database-warning-message
56          #:clsql-exists-condition
57          #:clsql-exists-condition-new-db
58          #:clsql-exists-condition-old-db
59          #:clsql-exists-warning
60          #:clsql-exists-error
61          #:clsql-closed-error
62          #:clsql-closed-error-database
63          
64          #:*loaded-database-types*
65          #:reload-database-types
66          #:*default-database-type*
67          #:*initialized-database-types*
68          #:initialize-database-type
69          
70          #:database
71          #:database-name
72          #:closed-database
73          #:database-name-from-spec
74          
75          ;; utils.cl
76          #:number-to-sql-string
77          #:float-to-sql-string
78          #:sql-escape-quotes
79          ))
80     (:export
81      ;; sql.cl
82      #:*connect-if-exists*
83      #:connected-databases
84      #:*default-database*
85      #:find-database
86      #:connect
87      #:disconnect
88      #:query
89      #:execute-command
90      #:map-query
91      #:do-query
92      
93      ;; functional.cl
94      #:insert-records
95      #:delete-records
96      #:update-records
97      #:with-database
98      
99      ;; For High-level UncommonSQL compatibility
100      #:sql-ident
101      #:list-tables
102      #:list-attributes
103      #:attribute-type
104      #:create-sequence 
105      #:drop-sequence
106      #:sequence-next
107      
108      ;; Pooled connections
109      #:disconnect-pooled
110      #:find-or-create-connection-pool
111      
112      ;; Transactions
113      #:with-transaction
114      #:commit-transaction
115      #:rollback-transaction
116      #:add-transaction-commit-hook
117      #:add-transaction-rollback-hook
118      
119      ;; Large objects (Marc B)
120      #:create-large-object
121      #:write-large-object
122      #:read-large-object
123      #:delete-large-object
124      
125      .
126      #1#
127      )
128     (:documentation "This is the INTERNAL SQL-Interface package of CLSQL."))
129   
130   )                                     ;eval-when
131
132 (defpackage #:clsql-user
133   (:use #:common-lisp #:clsql)
134   (:documentation "This is the user package for experimenting with CLSQL."))