projects
/
clsql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c1a4d6c
)
r1652: Stored field-types in result-set structures
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 24 Mar 2002 18:39:32 +0000
(18:39 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 24 Mar 2002 18:39:32 +0000
(18:39 +0000)
interfaces/aodbc/aodbc-sql.cl
patch
|
blob
|
history
interfaces/mysql/mysql-sql.cl
patch
|
blob
|
history
interfaces/postgresql-socket/postgresql-socket-sql.cl
patch
|
blob
|
history
interfaces/postgresql/postgresql-sql.cl
patch
|
blob
|
history
diff --git
a/interfaces/aodbc/aodbc-sql.cl
b/interfaces/aodbc/aodbc-sql.cl
index e3eedb54a565b1f784e1c00b77c4bf43e2314fdb..780c19663d50eca6039b37ad42c7ef7adac6f9e1 100644
(file)
--- a/
interfaces/aodbc/aodbc-sql.cl
+++ b/
interfaces/aodbc/aodbc-sql.cl
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: aodbc-sql.cl,v 1.
3 2002/03/24 18:08:27
kevin Exp $
+;;;; $Id: aodbc-sql.cl,v 1.
4 2002/03/24 18:39:32
kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
@@
-97,7
+97,8
@@
:query t
)
(values
:query t
)
(values
- (make-aodbc-result-set :query query :full-set full-set)
+ (make-aodbc-result-set :query query :full-set full-set
+ :field-types field-types)
(length column-names)
nil ;; not able to return number of rows with aodbc
))
(length column-names)
nil ;; not able to return number of rows with aodbc
))
diff --git
a/interfaces/mysql/mysql-sql.cl
b/interfaces/mysql/mysql-sql.cl
index 804c5dc737dc96036c1df589227ba6a8fa259c50..ad22f9d79b8854b3bcb38974d27a18a078480227 100644
(file)
--- a/
interfaces/mysql/mysql-sql.cl
+++ b/
interfaces/mysql/mysql-sql.cl
@@
-8,7
+8,7
@@
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: mysql-sql.cl,v 1.
4 2002/03/24 18:08:27
kevin Exp $
+;;;; $Id: mysql-sql.cl,v 1.
5 2002/03/24 18:39:32
kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
@@
-28,6
+28,9
@@
;;;; for MYSQL structure. This will make the code more robust in
;;;; the event that MySQL library changes the size of the mysql-mysql
;;;; structure.
;;;; for MYSQL structure. This will make the code more robust in
;;;; the event that MySQL library changes the size of the mysql-mysql
;;;; structure.
+;;;;
+;;;; Mar 2002
+;;;; Added field types
(defpackage :clsql-mysql
(:use :common-lisp :clsql-sys :mysql)
(defpackage :clsql-mysql
(:use :common-lisp :clsql-sys :mysql)
@@
-134,7
+137,8
@@
-(defmethod database-query (query-expression (database mysql-database) field-types)
+(defmethod database-query (query-expression (database mysql-database)
+ field-types)
(with-slots (mysql-ptr) database
(uffi:with-cstring (query-native query-expression)
(if (zerop (mysql-query mysql-ptr query-native))
(with-slots (mysql-ptr) database
(uffi:with-cstring (query-native query-expression)
(if (zerop (mysql-query mysql-ptr query-native))
@@
-173,7
+177,8
@@
(declare (type mysql-mysql-res-ptr-def res-ptr))
(if (not (uffi:null-pointer-p res-ptr))
(if full-set
(declare (type mysql-mysql-res-ptr-def res-ptr))
(if (not (uffi:null-pointer-p res-ptr))
(if full-set
- (values (make-mysql-result-set :res-ptr res-ptr :full-set t)
+ (values (make-mysql-result-set :res-ptr res-ptr :full-set t
+ :field-types field-types)
(mysql-num-fields res-ptr)
(mysql-num-rows res-ptr))
(values (make-mysql-result-set :res-ptr res-ptr)
(mysql-num-fields res-ptr)
(mysql-num-rows res-ptr))
(values (make-mysql-result-set :res-ptr res-ptr)
diff --git
a/interfaces/postgresql-socket/postgresql-socket-sql.cl
b/interfaces/postgresql-socket/postgresql-socket-sql.cl
index 1570a4e463a175b754c37278473060c828553097..2eb6e7c8fa477ec2ab7bafd2dba7f377a81b4b51 100644
(file)
--- a/
interfaces/postgresql-socket/postgresql-socket-sql.cl
+++ b/
interfaces/postgresql-socket/postgresql-socket-sql.cl
@@
-8,7
+8,7
@@
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: postgresql-socket-sql.cl,v 1.
2 2002/03/24 18:08:27
kevin Exp $
+;;;; $Id: postgresql-socket-sql.cl,v 1.
3 2002/03/24 18:39:32
kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
@@
-192,7
+192,8
@@
:error "Didn't receive result cursor for query."))
(values (make-postgresql-socket-result-set
:done nil
:error "Didn't receive result cursor for query."))
(values (make-postgresql-socket-result-set
:done nil
- :cursor cursor)
+ :cursor cursor
+ :field-types field-types)
(length (postgresql-cursor-fields cursor)))))))
(defmethod database-dump-result-set (result-set
(length (postgresql-cursor-fields cursor)))))))
(defmethod database-dump-result-set (result-set
diff --git
a/interfaces/postgresql/postgresql-sql.cl
b/interfaces/postgresql/postgresql-sql.cl
index 805f2c32992d6fe11c47b1e4c71063a047ee677b..4d473a02c428328622140ce4ce8e93e3c7d8a67a 100644
(file)
--- a/
interfaces/postgresql/postgresql-sql.cl
+++ b/
interfaces/postgresql/postgresql-sql.cl
@@
-8,7
+8,7
@@
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: postgresql-sql.cl,v 1.
4 2002/03/24 18:31:05
kevin Exp $
+;;;; $Id: postgresql-sql.cl,v 1.
5 2002/03/24 18:39:32
kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
@@
-188,13
+188,15
@@
(values (make-postgresql-result-set
:res-ptr result
:num-fields (PQnfields result)
(values (make-postgresql-result-set
:res-ptr result
:num-fields (PQnfields result)
- :num-tuples (PQntuples result))
+ :num-tuples (PQntuples result)
+ :field-types field-types)
(PQnfields result)
(PQntuples result))
(values (make-postgresql-result-set
:res-ptr result
:num-fields (PQnfields result)
(PQnfields result)
(PQntuples result))
(values (make-postgresql-result-set
:res-ptr result
:num-fields (PQnfields result)
- :num-tuples (PQntuples result))
+ :num-tuples (PQntuples result)
+ :field-types field-types)
(PQnfields result))))
(t
(unwind-protect
(PQnfields result))))
(t
(unwind-protect