--- /dev/null
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name: initialize.cl
+;;;; Purpose: Initializion routines for backend
+;;;; Programmers: Kevin M. Rosenberg
+;;;; Date Started: May 2002
+;;;;
+;;;; $Id: initialize.cl,v 1.1 2002/05/14 16:23:37 kevin Exp $
+;;;;
+;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
+;;;;
+;;;; CLSQL users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+;;;; *************************************************************************
+
+(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
+(in-package :clsql-sys)
+
+(defvar *loaded-database-types* nil
+ "Contains a list of database types which have been defined/loaded.")
+
+(defmethod database-type-load-foreign :after (database-type)
+ (when (database-type-library-loaded database-type)
+ (pushnew database-type *loaded-database-types*)))
+
+(defun reload-database-types ()
+ "Reloads any foreign code for the loaded database types after a dump."
+ (mapc #'database-type-load-foreign *loaded-database-types*))
+
+(defvar *default-database-type* nil
+ "Specifies the default type of database. Currently only :mysql is
+supported.")
+
+(defvar *initialized-database-types* nil
+ "Contains a list of database types which have been initialized by calls
+to initialize-database-type.")
+
+(defun initialize-database-type (&key (database-type *default-database-type*))
+ "Initialize the given database-type, if it is not already
+initialized, as indicated by `*initialized-database-types*'."
+ (if (member database-type *initialized-database-types*)
+ t
+ (when (database-initialize-database-type database-type)
+ (push database-type *initialized-database-types*)
+ t)))
+
+
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: clsql-base.system,v 1.3 2002/05/13 16:22:08 kevin Exp $
+;;;; $Id: clsql-base.system,v 1.4 2002/05/14 16:23:37 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
:components ((:file "package")
(:file "classes" :depends-on ("package"))
(:file "conditions" :depends-on ("classes"))
- (:file "db-interface" :depends-on ("conditions")))
+ (:file "db-interface" :depends-on ("conditions"))
+ (:file "initialize" :depends-on ("db-interface")))
:finally-do
(pushnew :clsql cl:*features*)
)
;;;; Programmer: Kevin M. Rosenberg\r
;;;; Date Started: Feb 2002\r
;;;;\r
-;;;; $Id: clsql-mysql.system,v 1.11 2002/05/14 15:44:11 kevin Exp $\r
+;;;; $Id: clsql-mysql.system,v 1.12 2002/05/14 16:23:37 kevin Exp $\r
;;;;\r
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
;;;;\r
\r
;;; System definition\r
\r
-(mk:load-system :clsql-uffi)\r
+(mk:load-system :uffi)\r
(mk:load-system :clsql-base)\r
(mk:load-system :clsql-uffi)\r
\r
;;;; Programmers: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: mysql-loader.cl,v 1.11 2002/05/14 16:16:54 kevin Exp $
+;;;; $Id: mysql-loader.cl,v 1.12 2002/05/14 16:19:11 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(uffi:find-foreign-library
"clsql-mysql"
`(,(translate-logical-pathname
- "CL-LIBRARY:clsql;interfaces;clsql-uffi;")
- "/usr/share/common-lisp/source/clsql/interfaces/clsql-uffi/")))
+ "CL-LIBRARY:clsql;interfaces;mysql;")
+ "/usr/share/common-lisp/source/clsql/interfaces/mysql/")))
(defvar *mysql-library-filename*
(cond
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: sql.cl,v 1.16 2002/05/11 14:31:10 marc.battyani Exp $
+;;;; $Id: sql.cl,v 1.17 2002/05/14 16:23:37 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
;;; Simple implementation of SQL along the lines of Harlequin's Common SQL
-;;; Database Types
-
-(defvar *loaded-database-types* nil
- "Contains a list of database types which have been defined/loaded.")
-
-(defmethod database-type-load-foreign :after (database-type)
- (when (database-type-library-loaded database-type)
- (pushnew database-type *loaded-database-types*)))
-
-(defun reload-database-types ()
- "Reloads any foreign code for the loaded database types after a dump."
- (mapc #'database-type-load-foreign *loaded-database-types*))
-
-(defvar *default-database-type* nil
- "Specifies the default type of database. Currently only :mysql is
-supported.")
-
-(defvar *initialized-database-types* nil
- "Contains a list of database types which have been initialized by calls
-to initialize-database-type.")
-
-(defun initialize-database-type (&key (database-type *default-database-type*))
- "Initialize the given database-type, if it is not already
-initialized, as indicated by `*initialized-database-types*'."
- (if (member database-type *initialized-database-types*)
- t
- (when (database-initialize-database-type database-type)
- (push database-type *initialized-database-types*)
- t)))
-
-
;;; Database handling
(defvar *connect-if-exists* :error