isomorfeus-hamster 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3f2c656886add52a2a6c29ccc906bb62f352472c798a0338a51fd1a292c9d352
4
+ data.tar.gz: 96cfa58fae24aaf67e3494c09bea40f9e222dedcc6018336f61f778b1b0c47ae
5
+ SHA512:
6
+ metadata.gz: 8a95b54cd64e1b73953aea2629bb9be0ffe107f9256bcf98ee619801c4a399f9ebacede1a6be9f02a1e99af05245038d8a1950fb2e172f4d87a1c8d7f0ba140b
7
+ data.tar.gz: f954296c5e25078c26bfc03e7a2b29df2ea8d71a2140448476eced461e21ab2a68143b876e4a3c01a0a14bd8b70c0098167d9f2b6e014a6a8ae56e0b62a54c26
data/LICENSE ADDED
@@ -0,0 +1,98 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Jan Biedermann
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+
24
+ Files in the 'ext/isomorfeus_hamster_ext' directory originally taken from
25
+ https://github.com/minad/lmdb:
26
+
27
+ Copyright (c) 2013 Daniel Mendler
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining
30
+ a copy of this software and associated documentation files (the
31
+ "Software"), to deal in the Software without restriction, including
32
+ without limitation the rights to use, copy, modify, merge, publish,
33
+ distribute, sublicense, and/or sell copies of the Software, and to
34
+ permit persons to whom the Software is furnished to do so, subject to
35
+ the following conditions:
36
+
37
+ The above copyright notice and this permission notice shall be
38
+ included in all copies or substantial portions of the Software.
39
+
40
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
42
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
44
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
45
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
46
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
47
+
48
+
49
+ Files in the 'ext/isomorfeus_hamster_ext/lmdb' directory originally taken from
50
+ https://github.com/LMDB/lmdb:
51
+
52
+ The OpenLDAP Public License
53
+ Version 2.8, 17 August 2003
54
+
55
+ Redistribution and use of this software and associated documentation
56
+ ("Software"), with or without modification, are permitted provided
57
+ that the following conditions are met:
58
+
59
+ 1. Redistributions in source form must retain copyright statements
60
+ and notices,
61
+
62
+ 2. Redistributions in binary form must reproduce applicable copyright
63
+ statements and notices, this list of conditions, and the following
64
+ disclaimer in the documentation and/or other materials provided
65
+ with the distribution, and
66
+
67
+ 3. Redistributions must contain a verbatim copy of this document.
68
+
69
+ The OpenLDAP Foundation may revise this license from time to time.
70
+ Each revision is distinguished by a version number. You may use
71
+ this Software under terms of this license revision or under the
72
+ terms of any subsequent revision of the license.
73
+
74
+ THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
75
+ CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
76
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
77
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
78
+ SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
79
+ OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
80
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
81
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
82
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
83
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
84
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
85
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
86
+ POSSIBILITY OF SUCH DAMAGE.
87
+
88
+ The names of the authors and copyright holders must not be used in
89
+ advertising or otherwise to promote the sale, use or other dealing
90
+ in this Software without specific, written prior permission. Title
91
+ to copyright in this Software shall at all times remain with copyright
92
+ holders.
93
+
94
+ OpenLDAP is a registered trademark of the OpenLDAP Foundation.
95
+
96
+ Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
97
+ California, USA. All Rights Reserved. Permission to copy and
98
+ distribute verbatim copies of this document is granted.
data/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # isomorfeus-hamster
2
+
3
+ Convenient and well performing key value store and object database.
4
+
5
+ ### Community and Support
6
+ At the [Isomorfeus Framework Project](http://isomorfeus.com)
7
+
@@ -0,0 +1 @@
1
+ FLAG(NODUPDATA, nodupdata)
@@ -0,0 +1,2 @@
1
+ #include "put_flags.h"
2
+ FLAG(MULTIPLE, multiple)
@@ -0,0 +1,7 @@
1
+ FLAG(REVERSEKEY, reversekey)
2
+ FLAG(DUPSORT, dupsort)
3
+ FLAG(INTEGERKEY, integerkey)
4
+ FLAG(DUPFIXED, dupfixed)
5
+ FLAG(INTEGERDUP, integerdup)
6
+ FLAG(REVERSEDUP, reversedup)
7
+ FLAG(CREATE, create)
@@ -0,0 +1,11 @@
1
+ FLAG(FIXEDMAP, fixedmap)
2
+ FLAG(NOSUBDIR, nosubdir)
3
+ FLAG(NOSYNC, nosync)
4
+ FLAG(RDONLY, rdonly)
5
+ FLAG(NOMETASYNC, nometasync)
6
+ FLAG(WRITEMAP, writemap)
7
+ FLAG(MAPASYNC, mapasync)
8
+ FLAG(NOTLS, notls)
9
+ FLAG(NOLOCK, nolock)
10
+ FLAG(NORDAHEAD, nordahead)
11
+ FLAG(NOMEMINIT, nomeminit)
@@ -0,0 +1,21 @@
1
+ OB_ERROR(SUCCESS)
2
+ OB_ERROR(KEYEXIST)
3
+ OB_ERROR(NOTFOUND)
4
+ OB_ERROR(PAGE_NOTFOUND)
5
+ OB_ERROR(CORRUPTED)
6
+ OB_ERROR(PANIC)
7
+ OB_ERROR(VERSION_MISMATCH)
8
+ OB_ERROR(INVALID)
9
+ OB_ERROR(MAP_FULL)
10
+ OB_ERROR(DBS_FULL)
11
+ OB_ERROR(READERS_FULL)
12
+ OB_ERROR(TLS_FULL)
13
+ OB_ERROR(TXN_FULL)
14
+ OB_ERROR(CURSOR_FULL)
15
+ OB_ERROR(PAGE_FULL)
16
+ OB_ERROR(MAP_RESIZED)
17
+ OB_ERROR(INCOMPATIBLE)
18
+ OB_ERROR(BAD_RSLOT)
19
+ OB_ERROR(BAD_TXN)
20
+ OB_ERROR(BAD_VALSIZE)
21
+ OB_ERROR(BAD_DBI)
@@ -0,0 +1,22 @@
1
+ require 'mkmf'
2
+
3
+ $CFLAGS << ' -O2 -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -g '
4
+ $INCFLAGS << " -I$(srcdir)/lmdb"
5
+ $VPATH ||= []
6
+ $VPATH << "$(srcdir)/lmdb"
7
+ $srcs = Dir.glob("#{$srcdir}/{,lmdb/}*.c").map {|n| File.basename(n) }
8
+
9
+ have_header 'limits.h'
10
+ have_header 'string.h'
11
+ have_header 'stdlib.h'
12
+ have_header 'errno.h'
13
+ have_header 'sys/types.h'
14
+ have_header 'assert.h'
15
+
16
+ have_header 'ruby.h'
17
+ have_func 'rb_funcall_passing_block'
18
+ have_func 'rb_thread_call_without_gvl2'
19
+
20
+ create_header
21
+
22
+ create_makefile('isomorfeus_hamster_ext')
@@ -0,0 +1,14 @@
1
+ static int METHOD(VALUE key, VALUE value, int* flags) {
2
+ ID id = rb_to_id(key);
3
+
4
+ if (0) {}
5
+ #define FLAG(const, name) else if (id == rb_intern(#name)) { if (RTEST(value)) { *flags |= MDB_##const; } }
6
+ #include FILE
7
+ #undef FLAG
8
+ else {
9
+ VALUE s = rb_inspect(key);
10
+ rb_raise(cError, "Invalid option %s", StringValueCStr(s));
11
+ }
12
+
13
+ return 0;
14
+ }