From 78e193a02f37f5e941eb3045eeba8384536f34b6 Mon Sep 17 00:00:00 2001 From: tokuhirom Date: Wed, 3 Jul 2013 17:26:32 +0900 Subject: [PATCH] updated documents. --- META.json | 13 ++++++++++++- README.md | 32 ++++++++++++++++++++++++++++++-- lib/Unqlite.pm | 36 ++++++++++++++++++++++++++++++++++-- 3 files changed, 76 insertions(+), 5 deletions(-) diff --git a/META.json b/META.json index 2de3d6e..6868ab6 100644 --- a/META.json +++ b/META.json @@ -1,5 +1,5 @@ { - "abstract" : "It's new $module", + "abstract" : "Perl bindings for Unqlite", "author" : [ "tokuhirom " ], @@ -52,5 +52,16 @@ } }, "release_status" : "unstable", + "resources" : { + "bugtracker" : { + "web" : "https://github.com/tokuhirom/Unqlite/issues" + }, + "homepage" : "https://github.com/tokuhirom/Unqlite", + "repository" : { + "type" : "git", + "url" : "git://github.com/tokuhirom/Unqlite.git", + "web" : "https://github.com/tokuhirom/Unqlite" + } + }, "version" : "0.01" } diff --git a/README.md b/README.md index 1d0b206..ea3edd9 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,42 @@ # NAME -Unqlite - It's new $module +Unqlite - Perl bindings for Unqlite # SYNOPSIS use Unqlite; + my $db = Unqlite->open('foo.db'); + $db->kv_store('foo', 'bar'); + say $db->kv_fetch('foo'); # => bar + $db->kv_delete('foo'); + undef $db; # close database + # DESCRIPTION -Unqlite is ... +UnQLite is a in-process software library which implements a self-contained, serverless, zero-configuration, transactional NoSQL database engine. UnQLite is a document store database similar to MongoDB, Redis, CouchDB etc. as well a standard Key/Value store similar to BerkeleyDB, LevelDB, etc. + +This module is Perl5 binding for Unqlite. + +If you want to know more information about Unqlite, see [http://unqlite.org/](http://unqlite.org/). + +# METHODS + +- `my $db = Unqlite->open('foo.db'[, $mode]);` + + Open the database. + +- `$db->kv_store($key, $value);` + + Store the entry to database. + +- `$db->kv_fetch($key);` + + Fetch data from database. + +- `$db->kv_delete($key);` + + Delte ` $key ` from database. # LICENSE diff --git a/lib/Unqlite.pm b/lib/Unqlite.pm index f7d3540..c444f3e 100644 --- a/lib/Unqlite.pm +++ b/lib/Unqlite.pm @@ -15,15 +15,47 @@ __END__ =head1 NAME -Unqlite - It's new $module +Unqlite - Perl bindings for Unqlite =head1 SYNOPSIS use Unqlite; + my $db = Unqlite->open('foo.db'); + $db->kv_store('foo', 'bar'); + say $db->kv_fetch('foo'); # => bar + $db->kv_delete('foo'); + undef $db; # close database + =head1 DESCRIPTION -Unqlite is ... +UnQLite is a in-process software library which implements a self-contained, serverless, zero-configuration, transactional NoSQL database engine. UnQLite is a document store database similar to MongoDB, Redis, CouchDB etc. as well a standard Key/Value store similar to BerkeleyDB, LevelDB, etc. + +This module is Perl5 binding for Unqlite. + +If you want to know more information about Unqlite, see L. + +=head1 METHODS + +=over 4 + +=item C<< my $db = Unqlite->open('foo.db'[, $mode]); >> + +Open the database. + +=item C<< $db->kv_store($key, $value); >> + +Store the entry to database. + +=item C<< $db->kv_fetch($key); >> + +Fetch data from database. + +=item C<< $db->kv_delete($key); >> + +Delte C< $key > from database. + +=back =head1 LICENSE