Version 4.0.6
[clsql.git] / db-mysql / mysql-api.lisp
index 026bde07744211ace6735979ac06b812203152d7..1f747f93c4e870d92522578e71925a96e63f702a 100644 (file)
@@ -8,9 +8,7 @@
 ;;;;                Original code by Pierre R. Mai
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id$
-;;;;
-;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of CLSQL, is Copyright (c) 2002-2009 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
   :module "mysql"
   :returning (* mysql-mysql))
 
-#-mysql-client-v4
-(declaim (inline mysql-connect))
-#-mysql-client-v4
-(uffi:def-function "mysql_connect"
-    ((mysql (* mysql-mysql))
-     (host :cstring)
-     (user :cstring)
-     (passwd :cstring))
-  :module "mysql"
-  :returning (* mysql-mysql))
-
 ;; Need to comment this out for LW 4.2.6
 ;; ? bug in LW version
 #-lispworks (declaim (inline mysql-real-connect))
   :module "mysql"
   :returning :int)
 
-#-mysql-client-v4
-(declaim (inline mysql-create-db))
-#-mysql-client-v4
-(uffi:def-function "mysql_create_db"
-  ((mysql (* mysql-mysql))
-   (db :cstring))
-  :module "mysql"
-  :returning :int)
-
-#-mysql-client-v4
-(declaim (inline mysql-drop-db))
-#-mysql-client-v4
-(uffi:def-function "mysql_drop_db"
-    ((mysql (* mysql-mysql))
-     (db :cstring))
-  :module "mysql"
-  :returning :int)
-
 (declaim (inline mysql-shutdown))
 (uffi:def-function "mysql_shutdown"
   ((mysql (* mysql-mysql)))
 (defun mysql-num-rows (res)
   (uffi:with-foreign-object (p-high32 :unsigned-int)
     (let ((low32 (clsql-mysql-num-rows res p-high32))
-         (high32 (uffi:deref-pointer p-high32 :unsigned-int)))
+          (high32 (uffi:deref-pointer p-high32 :unsigned-int)))
       (if (zerop high32)
-         low32
-       (make-64-bit-integer high32 low32)))))
+          low32
+        (make-64-bit-integer high32 low32)))))
 
 (uffi:def-function "clsql_mysql_affected_rows"
     ((mysql (* mysql-mysql))
 (defun mysql-affected-rows (mysql)
   (uffi:with-foreign-object (p-high32 :unsigned-int)
     (let ((low32 (clsql-mysql-affected-rows mysql p-high32))
-         (high32 (uffi:deref-pointer p-high32 :unsigned-int)))
+          (high32 (uffi:deref-pointer p-high32 :unsigned-int)))
       (if (zerop high32)
-         low32
-       (make-64-bit-integer high32 low32)))))
+          low32
+        (make-64-bit-integer high32 low32)))))
 
 (uffi:def-function "clsql_mysql_insert_id"
     ((res (* mysql-mysql))
 (defun mysql-insert-id (mysql)
   (uffi:with-foreign-object (p-high32 :unsigned-int)
   (let ((low32 (clsql-mysql-insert-id mysql p-high32))
-       (high32 (uffi:deref-pointer p-high32 :unsigned-int)))
+        (high32 (uffi:deref-pointer p-high32 :unsigned-int)))
     (if (zerop high32)
-       low32
+        low32
       (make-64-bit-integer high32 low32)))))