> Okay, another how many databases support this, question?  
I've checked today Sybase, but it doesn't seem to support WHERE on image.

        1> select * from tablex where imagex=0x212223
        2> go
        Msg 306, Level 16, State 1:
        Line 1:
        TEXT and IMAGE datatypes may not be used in a WHERE clause, except with the 
LIKE
        expression.

> I was unaware MySQL allowed queries based on comparison to a blob column.  
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Hexadecimal_values
 states:

        7.1.3 Hexadecimal values
        MySQL supports hexadecimal values. In number context these acts like an 
integer (64 bit precision). 
        In string context these acts like a binary string where each pair of hex 
digits is converted to a character. 

        mysql> SELECT 0xa+0
       -> 10
        mysql> select 0x5061756c;
       -> Paul

        Hexadecimal strings is often used by ODBC to give values for BLOB columns. 


> Is anyone aware of other database support for this?
> 
> BTW, Slawomir the term is PATCH.
Sorry for typo.

My next question is, does Peers support blobs at all (even if not all databases 
support blobs in WHERE)?
Is it ok to apply this patch to BasePeer to allow INSERT of blobs?

Index: BasePeer.java
===================================================================
RCS file: 
/products/cvs/turbine/turbine/src/java/org/apache/turbine/om/peer/BasePeer.java,v
retrieving revision 1.2
diff -c -r1.2 BasePeer.java
*** BasePeer.java       2000/08/08 20:49:24     1.2
--- BasePeer.java       2000/08/09 08:48:08
***************
*** 684,689 ****
--- 684,691 ----
                      rec.setValue( colMap.getColumnName(), criteria.getDouble(key) );
                  else if ( obj instanceof Hashtable )
                      rec.setValue( colMap.getColumnName(), hashtableToByteArray( 
(Hashtable)obj ) );
+                 else if ( obj instanceof byte[])
+                     rec.setValue( colMap.getColumnName(), (byte[])obj);
                  shouldSave = true;
               }
          }


Thanks in advance 

Slawek

> 
> John McNally

> > Hello!
> >
> > I'm learning to use peers in Turbine. In my database (mysql) 
> I've a column
> which type is mediumblob.
> > And I was unable to do BasePeer.doSelect(Criteria) without this path to
> org.apache.turbine.util.db.SqlExpression.java:
> > Is it making any sense?
> >
> > Slawek



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to