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: feeae4f9f6834be45e59f04689846b0f9d35317a5b2a573337919bea85ef4aa0
4
- data.tar.gz: c1db75ecae4084c5a0d613dd3a33c3f9ff1f309e83e0ac3f2e2ed5a8ec2dbc95
3
+ metadata.gz: 5c771d247e215a74a9fdedcc98bf1a72988acbcc6eadf81430f1fbc16224a93b
4
+ data.tar.gz: bb1095381153f88cdae29edb953be1da8120b8e29d063f27b0a87a9183e83430
5
5
  SHA512:
6
- metadata.gz: ad5bcd6581a6cd4df2498ec1f33f3e475837d47b9892fc773611ae80ad621effff9480113575d693df9792254ec0070c4111ab344550feb4d2eacee9be86ca84
7
- data.tar.gz: 75228a8af12ea9a5026dd68054178793582e489e9b587e29e61d71df6ca5b18024ff08ebf8c8635e13f514ac0a281af539f1304a81db97359e514409fd4644a3
6
+ metadata.gz: ea3f93e03e44a62b8181f99f5aedd41f6d2f3973006a9f8f9ef3a06c56f160d4d2fa5fbab30e08fc13fdb347f7fe8b3c44c9967ba2164c38f9faebf2e2037d46
7
+ data.tar.gz: b9f6f44c6f105669f0bc47c4638b6c0eed869b6811d836246df6257ac3da1c20d804ea54471f6c11f2a88555a4c58902d4e5765398ef0e6eb55b3db5b0c75baf
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 length = CLibsql.libsql_rows_column_length(self)
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 :libsql_rows_column_length, [Rows.by_value], :uint32
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.length
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] unless options[:sync_interval].nil?
553
- desc[:disable_read_your_writes] = !options[:read_your_writes] unless options[:read_your_writes].nil?
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turso_libsql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Levy Albuquerque