Refactored find-all and build-object to be more readable, shorter and
[clsql.git] / tests / utils.lisp
index ca7accbd0ede1b6ccfff2d29aefc21a450f71928..396e3030f629e99ae7e0f076b8756d7c1fc2ae93 100644 (file)
@@ -7,9 +7,7 @@
 ;;;; Author:  Kevin M. Rosenberg
 ;;;; Created: Mar 2002
 ;;;;
-;;;; $Id$
-;;;;
-;;;; This file, part of CLSQL, is Copyright (c) 2002-2004 by Kevin M. Rosenberg
+;;;; This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg
 ;;;;
 ;;;; CLSQL users are granted the rights to distribute and use this software
 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
 
 (in-package #:clsql-tests)
 
+(defun %get-int (v)
+  (etypecase v
+    (string (parse-integer v :junk-allowed t))
+    (integer v)
+    (number (truncate v))))
+
 (defvar *config-pathname*
   (make-pathname :defaults (user-homedir-pathname)
                  :name ".clsql-test"
                  :type "config"))
 
 (defvar +all-db-types+
-  '(:postgresql :postgresql-socket :mysql :sqlite :sqlite3 :odbc :oracle
+  '(:postgresql :postgresql-socket :postgresql-socket3 :mysql :sqlite :sqlite3 :odbc :oracle
     #+allegro :aodbc))
 
 (defclass conn-specs ()
@@ -32,6 +36,7 @@
    (mysql :accessor mysql-spec :initform nil)
    (postgresql :accessor postgresql-spec :initform nil)
    (postgresql-socket :accessor postgresql-socket-spec :initform nil)
+   (postgresql-socket3 :accessor postgresql-socket3-spec :initform nil)
    (sqlite :accessor sqlite-spec :initform nil)
    (sqlite3 :accessor sqlite3-spec :initform nil)
    (odbc :accessor odbc-spec :initform nil)