5ee30377951fc3b5808271d91506b2c4e990144b
[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.5 2003/07/23 19:33:38 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 (in-package #:cl-user)
22
23 (eval-when (:compile-toplevel :load-toplevel :execute)
24   (defpackage #:clsql-sys
25     (:nicknames #:clsql)
26     (:use #:cl #:clsql-base-sys)
27     (:import-from 
28      #:clsql-base
29      .
30      #1=(
31          #:clsql-condition
32          #:clsql-error
33          #:clsql-simple-error
34          #:clsql-warning
35          #:clsql-simple-warning
36          #:clsql-invalid-spec-error
37          #:clsql-invalid-spec-error-connection-spec
38          #:clsql-invalid-spec-error-database-type
39          #:clsql-invalid-spec-error-template
40          #:clsql-connect-error
41          #:clsql-connect-error-database-type
42          #:clsql-connect-error-connection-spec
43          #:clsql-connect-error-errno
44          #:clsql-connect-error-error
45          #:clsql-sql-error
46          #:clsql-sql-error-database
47          #:clsql-sql-error-expression
48          #:clsql-sql-error-errno
49          #:clsql-sql-error-error
50          #:clsql-database-warning
51          #:clsql-database-warning-database
52          #:clsql-database-warning-message
53          #:clsql-exists-condition
54          #:clsql-exists-condition-new-db
55          #:clsql-exists-condition-old-db
56          #:clsql-exists-warning
57          #:clsql-exists-error
58          #:clsql-closed-error
59          #:clsql-closed-error-database
60          
61          #:*loaded-database-types*
62          #:reload-database-types
63          #:*default-database-type*
64          #:*initialized-database-types*
65          #:initialize-database-type
66          
67          #:database
68          #:database-name
69          #:closed-database
70          #:database-name-from-spec
71          
72          ;; utils.cl
73          #:number-to-sql-string
74          #:float-to-sql-string
75          #:sql-escape-quotes
76          ))
77     (:export
78      ;; sql.cl
79      #:*connect-if-exists*
80      #:connected-databases
81      #:*default-database*
82      #:find-database
83      #:connect
84      #:disconnect
85      #:query
86      #:execute-command
87      #:map-query
88      #:do-query
89      #:for-each-row
90      
91      ;; functional.cl
92      #:insert-records
93      #:delete-records
94      #:update-records
95      #:with-database
96      
97      ;; For High-level UncommonSQL compatibility
98      #:sql-ident
99      #:list-tables
100      #:list-attributes
101      #:attribute-type
102      #:create-sequence 
103      #:drop-sequence
104      #:sequence-next
105      
106      ;; Pooled connections
107      #:disconnect-pooled
108      #:find-or-create-connection-pool
109      
110      ;; Transactions
111      #:with-transaction
112      #:commit-transaction
113      #:rollback-transaction
114      #:add-transaction-commit-hook
115      #:add-transaction-rollback-hook
116      
117      ;; Large objects (Marc B)
118      #:create-large-object
119      #:write-large-object
120      #:read-large-object
121      #:delete-large-object
122      
123      .
124      #1#
125      )
126     (:documentation "This is the INTERNAL SQL-Interface package of CLSQL."))
127   
128   )                                     ;eval-when
129
130 (defpackage #:clsql-user
131   (:use #:common-lisp #:clsql)
132   (:documentation "This is the user package for experimenting with CLSQL."))