On Tue, Jun 30, 2009 at 9:42 PM, Jason Baker<[email protected]> wrote:
> Apologies if I'm being dense, but I just want to make sure that I'm
> absolutely clear on this.  Oracle relies on having binary data
> hexlified.  If it's passed as a bind variable, then this has to be
> done on the Python side.  Therefore, if the back end encounters a
> RawStr variable, it is safe to assume that it should always be
> hexlified before sending it to the database?  Conversely, a person
> using Storm should assume that a RawStr *should not* be used to access
> textual data?

That is correct.  The Postgres backend handles conversion of values
going into the DB with the following snippet from
PostgresConnection.to_database():

    def to_database(self, params):
        for param in params:
            ...
            elif isinstance(param, str):
                yield psycopg2.Binary(param)

If you need to do any fixups on the values returned by the database
adapter, you can use a subclass of storm.database.Result and override
from_database() like the mysql backend does.

James.

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to