From a9f7a7c776ba101013ca36970db91792887e74a6 Mon Sep 17 00:00:00 2001 From: Coder12a <38924418+Coder12a@users.noreply.github.com> Date: Mon, 5 Nov 2018 23:55:07 -0600 Subject: [PATCH] Update README.md --- README.md | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fab47f8..3505df9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ColdDB =========== -ColdDB is a minetest database mod that implements a serverless, NoSQL database engine.
+ColdDB is a minetest mod that implements a serverless, NoSQL database engine.
It provides a key or key-value storage system using plain Lua tables. It also can iterate through the keys.
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 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 colddb.get_or_add_tag(coldbase,"Extra_Folder",{"Extra","Folder"}) ``` @@ -102,7 +102,7 @@ end) 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.
+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.
This way we could store many ips associated with the player instead of just one ip. API @@ -114,7 +114,41 @@ API 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 ===========