How to use HSET with table format like this
noomanee opened this issue · 3 comments
noomanee commented
I have table structured like this, and i would like to use HSET on Table SQL. Do you support this or any suggestions
key | field1 | field2 | field3 |
---|---|---|---|
1 | 'a' | 1 | 'aa' |
2 | 'b' | 1 | 'bb' |
What i am trying to do is to run this command |
HSET 1 field1 'a' field2 1 field3 'aa'
HSET 2 field1 'b' field2 1 field3 'bb'
jeff-zou commented
Maybe u can use 'value.data.structure'='row', the command will be like:
HSET 1 a "1\01a\011\01aa“
Maybe I should support json.
noomanee commented
Hm. I think that does not work. What i am trying to do is set multiple fields on single key. I think i miscommunicate. It should be
HMSET 1 field1 'a' field2 1 field3 'aa'
HMSET 2 field1 'b' field2 1 field3 'bb'
jeff-zou commented
u just do like: concat('field2',field2,'field3',field3)