On Wed, Jul 1, 2009 at 9:54 AM, Brad Allen<[email protected]> wrote:
> This issue came up because our app only supports ASCII strings, not
> unicode. Currently we use the RawStr property for attributes mapped to
> SQL Server VARCHAR fields, which has been working fine for us with the
> MS SQL backend.

Okay.  That is not a recommended way to use Storm.  Storm is working
with a model close to Python 3: use unicode for textual data, byte
strings for binary data and don't automatically coerce one to the
other.

Given the naming that Python eventually settled on, it might be worth
renaming RawStr() to Bytes() to cut down on confusion.


> Howevever, we're working toward Oracle compatibility now for our app
> (while still continuing MS SQL support), and we're finding that RawStr
> isn't appropriate for VARCHAR since RawStr needs to be hexified to
> support BLOB. We're discussing creating an Ascii property to use for
> mapping to VARCHAR.
>
> Is that the best approach, or does anyone have a different recommendation?

There has been suggestions for an "encoded string" property that would
present byte strings to Python and do the relevant encode/decode when
going to/from the database.  That would handle the ASCII case as well
as other encodings.


James.

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

Reply via email to