Skip to content

illyaveksler/kv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kv

kv is a simple key-value store written in Prolog with a tagging system.

To Run

  1. Make sure you have Prolog installed.
  2. Run prolog.
  3. Enter the following command to load the key-value store:
    consult('kv.pl').
  4. Run another instance of prolog.
  5. Enter the following on the second instance to start the client:
consult('client.pl').

Example Usage

  1. POST: Store a key-value pair:

    post_kv([key], [value]).
  2. GET: Retrieve the value for a key:

    get_kv([key], Result).
  3. DELETE: Remove a key-value pair:

    delete_kv([key]).
  4. TAG: Add a tag to a key-value pair:

    tag_kv([key], [tag]).
  5. UNTAG: Remove a tag from a tagged key-value pair:

    untag_kv([key], [tag]).
  6. TAG_QUERY: Retrieve a list of keys corresponding to pairs that match the query.

    tag_query_kv([query], Result).

    The query can be modified by three operators:

    • +: Intersection between two sets
    • |: Union between two sets
    • -: Subtracting the second set from the first

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published