Checking in changes prior to tagging of version 0.03.
Changelog diff is: diff --git a/Changes b/Changes index fb8ef47..ad21f65 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,12 @@ Revision history for Perl extension Unqlite {{$NEXT}} +0.03 2013-07-18T03:14:07Z + + - more OPEN consts as mode argument + we do not only want to create databases + (Reini Urban) + 0.02 2013-07-05T06:42:59Z - Store RC to magic to fix race condition
This commit is contained in:
parent
e1861918ec
commit
c6e3d80dd1
4 changed files with 23 additions and 5 deletions
6
Changes
6
Changes
|
@ -2,6 +2,12 @@ Revision history for Perl extension Unqlite
|
||||||
|
|
||||||
{{$NEXT}}
|
{{$NEXT}}
|
||||||
|
|
||||||
|
0.03 2013-07-18T03:14:07Z
|
||||||
|
|
||||||
|
- more OPEN consts as mode argument
|
||||||
|
we do not only want to create databases
|
||||||
|
(Reini Urban)
|
||||||
|
|
||||||
0.02 2013-07-05T06:42:59Z
|
0.02 2013-07-05T06:42:59Z
|
||||||
|
|
||||||
- Store RC to magic to fix race condition
|
- Store RC to magic to fix race condition
|
||||||
|
|
|
@ -63,8 +63,9 @@
|
||||||
"web" : "https://github.com/tokuhirom/UnQLite"
|
"web" : "https://github.com/tokuhirom/UnQLite"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version" : "0.02",
|
"version" : "0.03",
|
||||||
"x_contributors" : [
|
"x_contributors" : [
|
||||||
"Kenichi Ishigaki <ishigaki@cpan.org>"
|
"Kenichi Ishigaki <ishigaki@cpan.org>",
|
||||||
|
"Reini Urban <rurban@cpanel.net>"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
15
README.md
15
README.md
|
@ -6,14 +6,14 @@ UnQLite - Perl bindings for UnQLite
|
||||||
|
|
||||||
use UnQLite;
|
use UnQLite;
|
||||||
|
|
||||||
my $db = UnQLite->open('foo.db');
|
my $db = UnQLite->open('foo.db', UNQLITE_OPEN_READWRITE|UNQLITE_OPEN_CREATE);
|
||||||
$db->kv_store('foo', 'bar');
|
$db->kv_store('foo', 'bar');
|
||||||
say $db->kv_fetch('foo'); # => bar
|
say $db->kv_fetch('foo'); # => bar
|
||||||
$db->kv_delete('foo');
|
$db->kv_delete('foo');
|
||||||
undef $db; # close database
|
undef $db; # close database
|
||||||
|
|
||||||
# tie interface
|
# tie interface
|
||||||
tie my %hash, 'UnQLite', 'foo.db';
|
tie my %hash, 'UnQLite', 'foo.db', UNQLITE_OPEN_READWRITE;
|
||||||
$hash{foo} = 'bar';
|
$hash{foo} = 'bar';
|
||||||
say $hash{foo}; # => bar
|
say $hash{foo}; # => bar
|
||||||
|
|
||||||
|
@ -35,6 +35,17 @@ __You can use UnQLite.pm as DBM__.
|
||||||
|
|
||||||
Open the database.
|
Open the database.
|
||||||
|
|
||||||
|
Modes:
|
||||||
|
|
||||||
|
UNQLITE_OPEN_CREATE (Default)
|
||||||
|
UNQLITE_OPEN_READONLY
|
||||||
|
UNQLITE_OPEN_READWRITE
|
||||||
|
UNQLITE_OPEN_EXCLUSIVE
|
||||||
|
UNQLITE_OPEN_TEMP_DB
|
||||||
|
UNQLITE_OPEN_OMIT_JOURNALING
|
||||||
|
UNQLITE_OPEN_IN_MEMORY
|
||||||
|
UNQLITE_OPEN_MMAP
|
||||||
|
|
||||||
- `$db->kv_store($key, $value);`
|
- `$db->kv_store($key, $value);`
|
||||||
|
|
||||||
Store the entry to database.
|
Store the entry to database.
|
||||||
|
|
|
@ -4,7 +4,7 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Carp ();
|
use Carp ();
|
||||||
|
|
||||||
our $VERSION = "0.02";
|
our $VERSION = "0.03";
|
||||||
our $rc = 0;
|
our $rc = 0;
|
||||||
|
|
||||||
use XSLoader;
|
use XSLoader;
|
||||||
|
|
Loading…
Add table
Reference in a new issue