Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^4: SQLite and Storable: is "Text" okay?

by ikegami (Pope)
on Oct 06, 2010 at 17:43 UTC ( #863839=note: print w/replies, xml ) Need Help??

in reply to Re^3: SQLite and Storable: is "Text" okay?
in thread SQLite and Storable: is "Text" okay?

The way I read it, SQLite values are like Perl scalars. Stored in a convenient format, and coerced appropriately when required (by comparisons). The storage format is based on the value itself, whereas the coercion is based on the column type.

it only indicates that strings are stored that way.

Whatever it indicates, it's doesn't do that. It stores the string as it appears in the scalar.

$ perl -MStorable=freeze -e' utf8::upgrade( $_="abc\x{80}def" ); print freeze(\$_); ' | od -c 0000000 004 \a 004 1 2 3 4 004 004 004 \b 027 \b a b +c 0000020 302 200 d e f 0000025 $ perl -MStorable=freeze -e' utf8::downgrade( $_="abc\x{80}def" ); print freeze(\$_); ' | od -c 0000000 004 \a 004 1 2 3 4 004 004 004 \b \n \a a b +c 0000020 200 d e f 0000024

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863839]
[LanX]: Moon not Mars
Corion updates his location info to "I'm needed everywhere"
[choroba]: needed everywhere, available rarely

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (17)
As of 2017-03-27 15:38 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.