1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; ======================================================================
3 ;;;; File: package.lisp
4 ;;;; Author: Marcus Pearce <m.t.pearce@city.ac.uk>
5 ;;;; Created: 30/03/2004
6 ;;;; Updated: <04/04/2004 12:21:50 marcusp>
7 ;;;; ======================================================================
9 ;;;; Description ==========================================================
10 ;;;; ======================================================================
12 ;;;; Package definitions for CLSQL-USQL.
14 ;;;; ======================================================================
16 (in-package #:cl-user)
18 (eval-when (:compile-toplevel :load-toplevel :execute)
20 (defpackage #:clsql-usql-sys
21 (:nicknames #:usql-sys #:sql-sys)
22 (:use #:common-lisp #:clsql-base-sys #+lispworks #:clos)
23 ;; This is for working with the CMUCL/SBCL PCL MOP, which is kinda whacky
25 (:shadowing-import-from #+cmu :pcl #+sbcl :sb-pcl
31 :compute-effective-slot-definition
32 :direct-slot-definition-class
33 :effective-slot-definition-class
38 :slot-value-using-class
39 :standard-direct-slot-definition
40 :standard-effective-slot-definition
42 :class-direct-superclasses
45 (:import-from :clsql-base-sys
52 :clsql-invalid-spec-error
53 :clsql-invalid-spec-error-connection-spec
54 :clsql-invalid-spec-error-database-type
55 :clsql-invalid-spec-error-template
57 :clsql-connect-error-database-type
58 :clsql-connect-error-connection-spec
59 :clsql-connect-error-errno
60 :clsql-connect-error-error
62 :clsql-sql-error-database
63 :clsql-sql-error-expression
64 :clsql-sql-error-errno
65 :clsql-sql-error-error
66 :clsql-database-warning
67 :clsql-database-warning-database
68 :clsql-database-warning-message
69 :clsql-exists-condition
70 :clsql-exists-condition-new-db
71 :clsql-exists-condition-old-db
75 :clsql-closed-error-database
77 :clsql-sql-syntax-error
79 :check-connection-spec
80 :database-initialize-database-type
81 :database-type-load-foreign
82 :database-name-from-spec
83 :database-create-sequence
84 :database-drop-sequence
85 :database-sequence-next
86 :database-set-sequence-position
87 :database-query-result-set
88 :database-dump-result-set
89 :database-store-next-row
90 :database-get-type-specifier
93 :database-list-indexes
94 :database-list-sequences
95 :database-list-attributes
96 :database-attribute-type
97 :database-add-attribute
100 :*loaded-database-types*
101 :reload-database-types
102 :*default-database-type*
103 :*initialized-database-types*
104 :initialize-database-type
109 :command-recording-stream
110 :result-recording-stream
111 :database-view-classes
118 ;; "Private" exports for use by interface packages
119 :check-connection-spec
120 :database-initialize-database-type
121 :database-type-load-foreign
122 :database-name-from-spec
125 :database-execute-command
126 :database-create-sequence
127 :database-drop-sequence
128 :database-sequence-next
129 :database-set-sequence-position
130 :database-query-result-set
131 :database-dump-result-set
132 :database-store-next-row
133 :database-get-type-specifier
134 :database-list-tables
135 :database-table-exists-p
137 :database-view-exists-p
138 :database-list-indexes
139 :database-index-exists-p
140 :database-list-sequences
141 :database-sequence-exists-p
142 :database-list-attributes
143 :database-attribute-type
145 ;; Shared exports for re-export by USQL.
146 ;; I = Implemented, D = Documented
148 ;;====================================================
149 #1=(;;------------------------------------------------
151 ;;------------------------------------------------
154 :cache-table-queries ;
155 :*cache-table-queries-default* ;
156 :delete-records ; sql xx
157 :insert-records ; sql xx
158 :update-records ; sql xx
159 :execute-command ; sql xx
161 :print-query ; sql xx
166 :create-table ; table xx
167 :drop-table ; table xx
168 :list-tables ; table xx
169 :table-exists-p ; table xx
170 :list-attributes ; table xx
171 :attribute-type ; table xx
172 :list-attribute-types ; table xx
173 :create-view ; table xx
174 :drop-view ; table xx
175 :create-index ; table xx
176 :drop-index ; table xx
178 :standard-db-object ; objects xx
179 :def-view-class ; objects xx
180 :create-view-from-class ; objects xx
181 :drop-view-from-class ; objects xx
183 :instance-refreshed ;
184 :update-object-joins ;
185 :*default-update-objects-max-len* ;
186 :update-slot-from-record ; objects xx
187 :update-instance-from-records ; objects xx
188 :update-records-from-instance ; objects xx
189 :update-record-from-slot ; objects xx
190 :update-record-from-slots ; objects xx
191 :list-classes ; objects xx
192 :delete-instance-records ; objects xx
193 ;;Symbolic SQL Syntax
195 :sql-expression ; syntax xx
196 :sql-operation ; syntax xx
197 :sql-operator ; syntax xx
198 :disable-sql-reader-syntax ; syntax xx
199 :enable-sql-reader-syntax ; syntax xx
200 :locally-disable-sql-reader-syntax ; syntax xx
201 :locally-enable-sql-reader-syntax ; syntax xx
202 :restore-sql-reader-syntax-state ; syntax xx
204 ;;------------------------------------------------
205 ;; Miscellaneous Extensions
206 ;;------------------------------------------------
208 :*loaded-database-types* ; clsql-base xx
209 :reload-database-types ; clsql-base xx
210 :closed-database ; database xx
211 :database-type ; database x
212 :in-schema ; classes x
214 :list-views ; table xx
215 :view-exists-p ; table xx
216 :list-indexes ; table xx
217 :index-exists-p ; table xx
218 :create-sequence ; table xx
219 :drop-sequence ; table xx
220 :list-sequences ; table xx
221 :sequence-exists-p ; table xx
222 :sequence-next ; table xx
223 :sequence-last ; table xx
224 :set-sequence-position ; table xx
226 :view-table ; metaclass x
227 :create-sequence-from-class ; objects x
228 :drop-sequence-from-class ; objects x
230 :add-to-relation ; objects x
231 :remove-from-relation ; objects x
232 :read-sql-value ; objects x
233 :database-output-sql-as-type ; objects x
234 :database-get-type-specifier ; objects x
235 :database-output-sql ; sql/class xx
237 ;;-----------------------------------------------
238 ;; Conditions/Warnings/Errors
239 ;;-----------------------------------------------
244 :clsql-simple-warning
245 :clsql-invalid-spec-error
246 :clsql-invalid-spec-error-connection-spec
247 :clsql-invalid-spec-error-database-type
248 :clsql-invalid-spec-error-template
250 :clsql-connect-error-database-type
251 :clsql-connect-error-connection-spec
252 :clsql-connect-error-errno
253 :clsql-connect-error-error
256 :clsql-sql-error-database
257 :clsql-sql-error-expression
258 :clsql-sql-error-errno
259 :clsql-sql-error-error
260 :clsql-exists-condition
261 :clsql-exists-condition-new-db
262 :clsql-exists-condition-old-db
263 :clsql-exists-warning
266 :clsql-closed-error-database
268 ;;-----------------------------------------------
269 ;; Symbolic Sql Syntax
270 ;;-----------------------------------------------
310 (:documentation "This is the INTERNAL SQL-Interface package of USQL."))
313 ;; see http://thread.gmane.org/gmane.lisp.lispworks.general/681
315 (setf *packages-for-warn-on-redefinition*
316 (delete "SQL" *packages-for-warn-on-redefinition* :test 'string=))
318 (defpackage #:clsql-usql
319 (:nicknames #:usql #:sql)
321 (:import-from :clsql-usql-sys . #1#)
323 (:documentation "This is the SQL-Interface package of USQL."))