ruby-kuzu 0.0.1 → 0.0.3
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.md +16 -0
- data/README.md +30 -1
- data/ext/kuzu_ext/database.c +2 -1
- data/lib/kuzu.rb +1 -3
- data/spec/kuzu/types_spec.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9ef51b4e013cad8b7f0434db1a6fac89068681273f0d53981761c56a570628d
|
4
|
+
data.tar.gz: db7e93a8c4537f33cfa3bf77a6315ccb334f74d437869b2f053f1d479be7ee6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b70df49dbb9038ea0d02c0d6edb1e00c19ccfce943c464fd05efc55f6e848f110732aee64ce2910fc11107f1942fcfe5d8f19efd868bbffa5ceaeab8aaa7eae
|
7
|
+
data.tar.gz: 6633c48dd7c4cfad5b13de88b6123b7c7226dabcc2323a59831519db29b992f5efff9b48c946311934b96a3fffe8fe0ef17ca38afe3ba8f79094cc195ba2d880
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
# Release History for ruby-kuzu
|
2
2
|
|
3
3
|
---
|
4
|
+
|
5
|
+
## v0.0.3 [2025-05-22] Michael Granger <ged@FaerieMUD.org>
|
6
|
+
|
7
|
+
Fixes:
|
8
|
+
|
9
|
+
- Prevent implicit conversion of nil to Hash in Ruby < 3.4.
|
10
|
+
|
11
|
+
|
12
|
+
## v0.0.2 [2025-05-15] Michael Granger <ged@FaerieMUD.org>
|
13
|
+
|
14
|
+
Fixes:
|
15
|
+
|
16
|
+
- Fix an RDoc failure
|
17
|
+
- Add a bit more documentation
|
18
|
+
|
19
|
+
|
4
20
|
## v0.0.1 [2025-05-01] Michael Granger <ged@FaerieMUD.org>
|
5
21
|
|
6
22
|
Initial release
|
data/README.md
CHANGED
@@ -17,7 +17,36 @@ docs
|
|
17
17
|
|
18
18
|
A Ruby binding for the Kùzu embedded graph database.
|
19
19
|
|
20
|
-
|
20
|
+
|
21
|
+
### Creating A Database and Connecting To It
|
22
|
+
|
23
|
+
To create an in-memory database:
|
24
|
+
|
25
|
+
database = Kuzu.database
|
26
|
+
# => #<Kuzu::Database:0x000000012917ec68 path:nil read-only:false>
|
27
|
+
|
28
|
+
Or explicitly via an empty string:
|
29
|
+
|
30
|
+
database = Kuzu.database( '' )
|
31
|
+
# => #<Kuzu::Database:0x000000012144edb0 path:nil read-only:false>
|
32
|
+
|
33
|
+
If you pass a non-empty string, it is assumed to be the path to a database:
|
34
|
+
|
35
|
+
database = Kuzu.database( 'path/to/mydb' )
|
36
|
+
# => #<Kuzu::Database:0x0000000121624d10 path:"path/to/mydb" read-only:false>
|
37
|
+
|
38
|
+
There's also support for passing configuration options to the database
|
39
|
+
handle as keyword arguments to the `.database` method:
|
40
|
+
|
41
|
+
database = Kuzu.database( 'mydb', read_only: true )
|
42
|
+
# => #<Kuzu::Database:0x00000001227aa5a8 path:"mydb" read-only:true>
|
43
|
+
|
44
|
+
Once you have a Kuzu::Database object, you need a connection to actually use it:
|
45
|
+
|
46
|
+
conn = db.connect
|
47
|
+
# => #<Kuzu::Connection:0x0000000122a41f28 threads:16>
|
48
|
+
|
49
|
+
|
21
50
|
|
22
51
|
### Querying
|
23
52
|
|
data/ext/kuzu_ext/database.c
CHANGED
@@ -97,7 +97,7 @@ rkuzu_database_s_allocate( VALUE klass )
|
|
97
97
|
* call-seq:
|
98
98
|
* database.new( path, **options ) -> database
|
99
99
|
*
|
100
|
-
* Create a new
|
100
|
+
* Create a new Database using the given +path+ and +options+.
|
101
101
|
*
|
102
102
|
*/
|
103
103
|
static VALUE
|
@@ -112,6 +112,7 @@ rkuzu_database_initialize( int argc, VALUE *argv, VALUE self )
|
|
112
112
|
char *database_path;
|
113
113
|
|
114
114
|
rb_scan_args( argc, argv, "1:", &path, &options );
|
115
|
+
if ( options == Qnil ) options = rb_hash_new();
|
115
116
|
config_argv[0] = options;
|
116
117
|
config = rb_funcallv_public_kw( rkuzu_cKuzuConfig, rb_intern("from_options"), 1,
|
117
118
|
config_argv, RB_PASS_KEYWORDS );
|
data/lib/kuzu.rb
CHANGED
data/spec/kuzu/types_spec.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-kuzu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
8qAqdfV+4u6Huu1KzAuDQCheyEyISsLST37sU/irV3czV6BiFipWag1XiJciRT3A
|
35
35
|
wZqCfTNVHTdtsCbfdA1DsA3RdG2iEH3TOHzv1Rqzqh4=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2025-05-
|
37
|
+
date: 2025-05-22 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: rake-compiler
|
metadata.gz.sig
CHANGED
Binary file
|