If you are looking to store a group of rows at the same time in one
hash, like "store all of the rows returned by query X in a single
hash", then one way I've seen is...
<queryid> -> {
'-1': <column names>,
'0': 'column 1 data,column 2 data,...',
'1': <second row data>,
....
}
So you identify your column rows with some special key, then you
serialize your data as values as indexed entries in the hash. CSV
works pretty well, and overall you may be able to save some space by
not duplicating column names.
If you want to omit the '-1' row, and/or you don't mind duplicate
data, you can use JSON instead of CSV, which is convenient in the fact
that most clients will give you a language-specific hash as a result
instead of you having to write code to create them (you'll still have
to manually pull the rows and call your JSON decoder, but that's not
so bad).
Regards,
- Josiah
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>