[plugin] rex_taffydb (local database)

Post your completed addons to share with the community

Post » Sun Jul 30, 2017 10:50 am

@rexrainbow

how to insert json string to some key in nedb?
when i use action:set value, the value become string (not json)
but when i use action:insert json data, it adds new row,although i have set unique index key

Image


Image
B
22
S
10
G
2
Posts: 8
Reputation: 2,869

Post » Wed Aug 02, 2017 2:49 am

@agittm

Call "Action:Insert JSON data" to insert rows by JSON string.

I did not add action to set JSON value yet, will add this request to TODO. Now you might set JSON string value.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Sat Aug 05, 2017 1:36 am

Update

rex_taffydb, rex_nedb:

- Add "action: Set JSON" to set JSON value into row.



@agittm
Here it is.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Sat Aug 05, 2017 9:44 am

wow you're amazing! gonna implement it to my ongoing project. Many thanks!

Image


Image
B
22
S
10
G
2
Posts: 8
Reputation: 2,869

Post » Sun Aug 27, 2017 5:04 am

hi @rexrainbow

another question, i don't know it's bug or not but when i combine variable with static string in value field, i cannot get what i want.
For example :

i call action:Add to
-key="some.key"
-value=myChar&"_Level"

where myChar is variable, and what i want is the value field contains variable named Foo_Level, but instead of that, the saving progress become fail.

Image


Image
B
22
S
10
G
2
Posts: 8
Reputation: 2,869

Post » Sun Aug 27, 2017 6:35 am

@agittm

Please provide a very simple test capx for this case.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Sun Aug 27, 2017 10:03 am


Image


Image
B
22
S
10
G
2
Posts: 8
Reputation: 2,869

Post » Sun Aug 27, 2017 10:40 am

@agittm

Value of MyChar&"_Level" is a string ("Goku_Level" as the result) in first action (the error one). Value of 2nd action is "2", which is a number.
Since "add to" only works with number, the first action will be incorrect.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests