From: Kevin M. Rosenberg Date: Tue, 14 May 2002 16:23:37 +0000 (+0000) Subject: r2044: Debian build X-Git-Tag: v3.8.6~1066 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=f5b810d17ae9c5898222b179869912f9736b97b2 r2044: Debian build --- diff --git a/base/initialize.cl b/base/initialize.cl new file mode 100644 index 0000000..067dfa7 --- /dev/null +++ b/base/initialize.cl @@ -0,0 +1,51 @@ +;;;; -*- 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))) + + diff --git a/clsql-base.system b/clsql-base.system index 80f359c..8a13152 100644 --- a/clsql-base.system +++ b/clsql-base.system @@ -7,7 +7,7 @@ ;;;; 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 ;;;; @@ -34,7 +34,8 @@ :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*) ) diff --git a/clsql-mysql.system b/clsql-mysql.system index e6ee69d..ec953c8 100644 --- a/clsql-mysql.system +++ b/clsql-mysql.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-mysql.system,v 1.11 2002/05/14 15:44:11 kevin Exp $ +;;;; $Id: clsql-mysql.system,v 1.12 2002/05/14 16:23:37 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -22,7 +22,7 @@ ;;; System definition -(mk:load-system :clsql-uffi) +(mk:load-system :uffi) (mk:load-system :clsql-base) (mk:load-system :clsql-uffi) diff --git a/interfaces/mysql/mysql-loader.cl b/interfaces/mysql/mysql-loader.cl index 85ccff2..a0afeb5 100644 --- a/interfaces/mysql/mysql-loader.cl +++ b/interfaces/mysql/mysql-loader.cl @@ -7,7 +7,7 @@ ;;;; 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 ;;;; @@ -29,8 +29,8 @@ (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 diff --git a/sql/sql.cl b/sql/sql.cl index ed18c0b..5414eba 100644 --- a/sql/sql.cl +++ b/sql/sql.cl @@ -8,7 +8,7 @@ ;;;; 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 @@ -30,37 +30,6 @@ ;;; 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