Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistakes in Documentation #100

Open
zv09 opened this issue Sep 15, 2022 · 1 comment
Open

Mistakes in Documentation #100

zv09 opened this issue Sep 15, 2022 · 1 comment

Comments

@zv09
Copy link

zv09 commented Sep 15, 2022

https://pysondb.github.io/pysonDB/update
According to updateArray method example on this page
is need to change name=Pyson-CLI for name= ArrayEntry
>> # In the file.json the data is updated for all data where name=Pyson-CLI
like:

>> from pysondb import db
>> a=db.getDb("file.json")
>> a.getBy({"name":"ArrayEntry"})
>> [{"name":"ArrayEntry", "epic_array":[0,1,2]}]
>> a.updateArray({"name":"ArrayEntry"},"epic_array",3)
>> a.getBy({"name":"ArrayEntry"})
>> # In the file.json the data is updated for all data where name=ArrayEntry
>> # We can verify it below.
>> [{"name": "ArrayEntry", "epic_array":[0,1,2,3]}]
>> a.updateArray({"name":"ArrayEntry"}, "epic_array", 4, 4)
>> a.getBy({"name":"ArrayEntry"})
>> [{"name": "ArrayEntry", "epic_array":[1,2,3,4]}

to the JSON file:file.json for this example, should add {"name":"ArrayEntry", "epic_array":[0,1,2]} or another fields for this db?

@3dw1np
Copy link

3dw1np commented Nov 28, 2022

It seems we cannot new keys at the moment ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants