reading mysql binary data

quasi <[email protected]> Tue, 3 Aug 2010 02:44:29 +0530
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
Hey guys,

I am at my wits end as to how to read binary (geospatial data) from
mysql.  My bad probably. Either I should be able to read the binary
data (which I will have to convert appropriately later) or I should be
able to construct (somehow) a query where I can specify the mysql
conversion functions as AsText()  in the below query.  As I want
objects back I was wondering if I could use the clsql special []
syntax to generate such a query.

select id, AsText(coordinates) AS coordinates from pt WHERE id = 1

(clsql:def-view-class pt ()
  ((id
    :db-kind :key
    :db-constraints (:unsigned :not-null :auto-increment)
    :type integer
    :initarg :id
    :accessor id
    :documentation "")
   (coordinates
    :db-type "point"
    :db-reader 'wkb:decode
    :type blob
    :accessor coordinates
    :initarg :coordinates)))


In general what is the best way forward if I want to read specific
binary data (as above) or general binary blobs via the CSLQL interface
?

thanks!
Abhijit

-- 
Abhijit Rao (quasi)

REd Pill is Lisp.