forked from mtcontrib/colddb
Update README.md
This commit is contained in:
parent
e88c23ec0c
commit
a9f7a7c776
42
README.md
42
README.md
|
@ -1,7 +1,7 @@
|
||||||
ColdDB
|
ColdDB
|
||||||
===========
|
===========
|
||||||
|
|
||||||
ColdDB is a minetest database mod that implements a serverless, NoSQL database engine.<br>
|
ColdDB is a minetest mod that implements a serverless, NoSQL database engine.<br>
|
||||||
It provides a key or key-value storage system using plain Lua tables. It also can iterate through the keys.<br>
|
It provides a key or key-value storage system using plain Lua tables. It also can iterate through the keys.<br>
|
||||||
It is not required to add this mod to secure.trusted_mods this mod will still work.
|
It is not required to add this mod to secure.trusted_mods this mod will still work.
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ colddb.iterate_index_table(coldbase,nil,func_list_keys,nil,50)
|
||||||
```lua
|
```lua
|
||||||
colddb.add_tag(coldbase,"Extra_Folder",{"Extra","Folder"})
|
colddb.add_tag(coldbase,"Extra_Folder",{"Extra","Folder"})
|
||||||
```
|
```
|
||||||
12. returns the tag name if the tag does not exists creates it.
|
12. returns the tag name if the tag does not exists it creates one.
|
||||||
```lua
|
```lua
|
||||||
colddb.get_or_add_tag(coldbase,"Extra_Folder",{"Extra","Folder"})
|
colddb.get_or_add_tag(coldbase,"Extra_Folder",{"Extra","Folder"})
|
||||||
```
|
```
|
||||||
|
@ -102,7 +102,7 @@ end)
|
||||||
Quick Look Notes
|
Quick Look Notes
|
||||||
===========
|
===========
|
||||||
|
|
||||||
In the example above we could also create a more complex ip database using tags. Creating tags named after the player then assigning the ip files to it.<br>
|
In the example above we could also create a more complex ip database using tags. Creating tags named after the player then assigning the ip files to them.<br>
|
||||||
This way we could store many ips associated with the player instead of just one ip.
|
This way we could store many ips associated with the player instead of just one ip.
|
||||||
|
|
||||||
API
|
API
|
||||||
|
@ -114,7 +114,41 @@ API
|
||||||
|
|
||||||
Creates an directory and links it as a database. Returns a 'db' obeject.
|
Creates an directory and links it as a database. Returns a 'db' obeject.
|
||||||
|
|
||||||
-
|
- **colddb.add_global_tag(db,tag)**
|
||||||
|
|
||||||
|
Add an extra folder to the directory and advance the database to the added folder.
|
||||||
|
|
||||||
|
- **colddb.add_tag(db,name,tag)**
|
||||||
|
|
||||||
|
- **colddb.get_or_add_tag(db,name,tag)**
|
||||||
|
|
||||||
|
- **colddb.remove_tag(db,name)**
|
||||||
|
|
||||||
|
- **colddb.get_count(db,tag_name)**
|
||||||
|
|
||||||
|
- **colddb.iterate_index_table(db,begin_func,func_on_iterate,end_func,cycles_per_tick,args,tag_name)**
|
||||||
|
|
||||||
|
- **begin_func(args)**
|
||||||
|
|
||||||
|
- **func_on_iterate(key,index,args)**
|
||||||
|
|
||||||
|
- **end_func(args)**
|
||||||
|
|
||||||
|
- **colddb.set(db,name,_table,tag_name)**
|
||||||
|
|
||||||
|
- **colddb.set_key(db,name,tag_name)**
|
||||||
|
|
||||||
|
- **colddb.get(db,name,tag_name)**
|
||||||
|
|
||||||
|
- **colddb.get_key(db,name,tag_name)**
|
||||||
|
|
||||||
|
- **colddb.remove(db,name,tag_name)**
|
||||||
|
|
||||||
|
- **Database object fields**
|
||||||
|
|
||||||
|
- **indexes**
|
||||||
|
|
||||||
|
- **add_to_mem_pool**
|
||||||
|
|
||||||
License
|
License
|
||||||
===========
|
===========
|
||||||
|
|
Loading…
Reference in New Issue
Block a user