turso_libsql 0.2.0 → 0.2.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c771d247e215a74a9fdedcc98bf1a72988acbcc6eadf81430f1fbc16224a93b
|
4
|
+
data.tar.gz: bb1095381153f88cdae29edb953be1da8120b8e29d063f27b0a87a9183e83430
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea3f93e03e44a62b8181f99f5aedd41f6d2f3973006a9f8f9ef3a06c56f160d4d2fa5fbab30e08fc13fdb347f7fe8b3c44c9967ba2164c38f9faebf2e2037d46
|
7
|
+
data.tar.gz: b9f6f44c6f105669f0bc47c4638b6c0eed869b6811d836246df6257ac3da1c20d804ea54471f6c11f2a88555a4c58902d4e5765398ef0e6eb55b3db5b0c75baf
|
Binary file
|
Binary file
|
Binary file
|
data/lib/libsql.rb
CHANGED
@@ -6,6 +6,7 @@ module CLibsql # :nodoc:
|
|
6
6
|
file =
|
7
7
|
case RUBY_PLATFORM
|
8
8
|
in /arm64-darwin/ then 'aarch64-apple-darwin/liblibsql.dylib'
|
9
|
+
in /x86_84-darwin/ then 'x86_64-apple-darwin/liblibsql.dylib'
|
9
10
|
in /x86_64-linux/ then 'x86_64-unknown-linux-gnu/liblibsql.so'
|
10
11
|
in /aarch64-linux/ then 'aarch64-unknown-linux-gnu/liblibsql.so'
|
11
12
|
in /arm64-linux/ then 'aarch64-unknown-linux-gnu/liblibsql.so'
|
@@ -94,7 +95,7 @@ module CLibsql # :nodoc:
|
|
94
95
|
def next = CLibsql.libsql_rows_next(self).tap(&:verify)
|
95
96
|
def deinit = CLibsql.libsql_rows_deinit(self)
|
96
97
|
def name_at(index) = CLibsql.libsql_rows_column_name(self, index)
|
97
|
-
def
|
98
|
+
def column_count = CLibsql.libsql_rows_column_count(self)
|
98
99
|
end
|
99
100
|
|
100
101
|
class Row < FFI::Struct # :nodoc:
|
@@ -126,7 +127,9 @@ module CLibsql # :nodoc:
|
|
126
127
|
sync_interval: :uint64,
|
127
128
|
cypher: Cypher,
|
128
129
|
disable_read_your_writes: :bool,
|
129
|
-
webpki: :bool
|
130
|
+
webpki: :bool,
|
131
|
+
synced: :bool,
|
132
|
+
disable_safety_assert: :bool
|
130
133
|
end
|
131
134
|
|
132
135
|
class Bind < FFI::Struct # :nodoc:
|
@@ -233,7 +236,7 @@ module CLibsql # :nodoc:
|
|
233
236
|
attach_function :libsql_statement_reset, [Statement.by_value], :void
|
234
237
|
|
235
238
|
attach_function :libsql_rows_next, [Rows.by_value], Row.by_value
|
236
|
-
attach_function :
|
239
|
+
attach_function :libsql_rows_column_count, [Rows.by_value], :uint32
|
237
240
|
attach_function :libsql_rows_column_name, [Rows.by_value, :uint32], Slice.by_value
|
238
241
|
|
239
242
|
attach_function :libsql_row_empty, [Row.by_value], :bool
|
@@ -331,7 +334,7 @@ module Libsql
|
|
331
334
|
def column_count
|
332
335
|
raise ClosedException if closed?
|
333
336
|
|
334
|
-
@inner.
|
337
|
+
@inner.column_count
|
335
338
|
end
|
336
339
|
|
337
340
|
def columns
|
@@ -549,8 +552,8 @@ module Libsql
|
|
549
552
|
desc[sym] = FFI::MemoryPointer.from_string options[sym] unless options[sym].nil?
|
550
553
|
end
|
551
554
|
|
552
|
-
desc[:sync_interval] = options[:sync_interval]
|
553
|
-
desc[:disable_read_your_writes] = !options[:read_your_writes]
|
555
|
+
desc[:sync_interval] = options[:sync_interval] || 0
|
556
|
+
desc[:disable_read_your_writes] = !options[:read_your_writes] || true
|
554
557
|
|
555
558
|
@inner = CLibsql::Database.init desc
|
556
559
|
|