dynein
dynein copied to clipboard
example to update item's attribute as string
I can update an existing item to set/add attribute as boolean
or number
.
# working when set the `attr` as boolean or number
dy upd key --set "attr = false"
dy upd key --set "attr = 100"
When set an attribute as string, I got below error. No idea how making it work.
dy upd key --set "attr = 'ssss'"
thread 'main' panicked at 'failed to parse right hand object ''ssss'' into AttributeValue.', src/data.rs:553:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
dy upd key --set "attr = ssss"
thread 'main' panicked at 'failed to parse right hand object 'ssss' into AttributeValue.', src/data.rs:553:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+1
Dynein does not support string by single quote in the --set
option. Instead, you can use dy upd key --set 'attr = "ssss"'
. I understand many programming languages support single and double quote strings. Therefore, I want to treat this issue as a feature request.
This issue has been addressed in #132. You can now use both single-quoted strings and double-quoted strings. We have plans to release it in v0.3.0.