mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-29 13:12:36 +00:00
fix jsshDB doc
This commit is contained in:
parent
a7997f21b5
commit
975f99a4b0
@ -462,21 +462,20 @@ Usually message is automatically forwarded in 'commands.sh', but you can forwar
|
|||||||
----
|
----
|
||||||
|
|
||||||
### jsshDB
|
### jsshDB
|
||||||
Since output generated by JSON.sh is so handy to use in bash, we use the format for a simple keys/value storage and providing
|
Since output generated by JSON.sh is so handy to use in bash, we use the format for a simple keys/value file store.
|
||||||
fucntions to read and write JSON.sh style data from and to files.
|
|
||||||
The file extions is '.jssh' and for security reasons location of jssh files is restricted to BASHBOT_ETC and BASHBOT_DATA..
|
The file extions is '.jssh' and for security reasons location of jssh files is restricted to BASHBOT_ETC and BASHBOT_DATA..
|
||||||
|
|
||||||
#### fast and slow database operations
|
#### fast and slow operations
|
||||||
|
|
||||||
jsshDB files are simple text files and you can add new Key/value pairs at the end of the file, this overwritesn
|
jsshDB files are simple text files and if you append a new Key/value pairs to the end of the file it overwrites
|
||||||
already existing key/value pairs with new values.
|
an existing key/value pair. We use this behaivor for "fast" file operations.
|
||||||
|
|
||||||
Funtions simply add to the end without deleting an existing key/value pair are fast, but over time the
|
"slow funtions" simply add a new key/value pair without deleting an existing key/value pair, this is fast but over (long)
|
||||||
file grows with every write. I call this funtions "fast functions".
|
time the file grows infinitly.
|
||||||
|
|
||||||
"slow funtions" in contrast read the whole file, modify the key/value pairs and write the whole file back.
|
"slow funtions" in contrast modify the key/value pairs and write the whole file back,
|
||||||
this needs more time and IO, but does clean up the file. All duplicate added key/value pairs are deleted
|
this is slower but does clean up the file. All duplicate key/value pairs are deleted
|
||||||
and only the last valid value is written to the file.
|
and only the last one is written back to the file.
|
||||||
|
|
||||||
fast functions:
|
fast functions:
|
||||||
|
|
||||||
@ -1021,5 +1020,5 @@ The name of your bot is availible as bash variable "$ME", there is no need to ca
|
|||||||
#### [Prev Best Practice](5_practice.md)
|
#### [Prev Best Practice](5_practice.md)
|
||||||
#### [Next Notes for Developers](7_develop.md)
|
#### [Next Notes for Developers](7_develop.md)
|
||||||
|
|
||||||
#### $$VERSION$$ 0.96-dev2-1-g67b9039
|
#### $$VERSION$$ 0.96-dev2-2-ga7997f2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user