문제

Am I correct to assume that nested dictionaries are not supported in aws simpledb? Should I just serialize everything into json and push to the database?

For example,

test = dict(company='test company', users={'username':'joe', 'password': 'test'})

This returns test with keys of 'company' and 'users', however 'users' just represents a string..

도움이 되었습니까?

해결책

Simply, YES, SimpleDB provides only first level of keys.

So if you want to store data with higher level of key nesting, you will have to serialize the data to a string and you will not have simple select commands to make queries, using deeper nested data (you will be given to test it as a string, but will not have simple access to subkey values).

Note, that one key (in one record) handles storing multiple values, but this is sort of list (often used to store multiple tags), but not a dictionary.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top