mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-28 04:45:00 +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
|
||||
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
|
||||
fucntions to read and write JSON.sh style data from and to files.
|
||||
Since output generated by JSON.sh is so handy to use in bash, we use the format for a simple keys/value file store.
|
||||
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
|
||||
already existing key/value pairs with new values.
|
||||
jsshDB files are simple text files and if you append a new Key/value pairs to the end of the file it overwrites
|
||||
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
|
||||
file grows with every write. I call this funtions "fast functions".
|
||||
"slow funtions" simply add a new key/value pair without deleting an existing key/value pair, this is fast but over (long)
|
||||
time the file grows infinitly.
|
||||
|
||||
"slow funtions" in contrast read the whole file, 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
|
||||
and only the last valid value is written to the file.
|
||||
"slow funtions" in contrast modify the key/value pairs and write the whole file back,
|
||||
this is slower but does clean up the file. All duplicate key/value pairs are deleted
|
||||
and only the last one is written back to the file.
|
||||
|
||||
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)
|
||||
#### [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