mirror of
https://gitea.invidious.io/iv-org/shard-crystal-sqlite3.git
synced 2024-08-15 00:53:26 +00:00
Update to crystal 0.10.0
This commit is contained in:
parent
45fee52b98
commit
ee0bc75e3a
1 changed files with 2 additions and 3 deletions
|
@ -46,7 +46,7 @@ describe Database do
|
||||||
|
|
||||||
it "executes with bind blob" do
|
it "executes with bind blob" do
|
||||||
ary = UInt8[0x53, 0x51, 0x4C, 0x69, 0x74, 0x65]
|
ary = UInt8[0x53, 0x51, 0x4C, 0x69, 0x74, 0x65]
|
||||||
rows = with_db(&.execute(%(select cast(? as BLOB)), Slice.new(ary.buffer, ary.size)))
|
rows = with_db(&.execute(%(select cast(? as BLOB)), Slice.new(ary.to_unsafe, ary.size)))
|
||||||
row = rows[0]
|
row = rows[0]
|
||||||
cell = row[0] as Slice(UInt8)
|
cell = row[0] as Slice(UInt8)
|
||||||
cell.to_a.should eq(ary)
|
cell.to_a.should eq(ary)
|
||||||
|
@ -105,7 +105,6 @@ describe Database do
|
||||||
with_db(&.get_first_row(%(select 1))).should eq([1])
|
with_db(&.get_first_row(%(select 1))).should eq([1])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
it "gets first value" do
|
it "gets first value" do
|
||||||
with_db(&.get_first_value(%(select 1))).should eq(1)
|
with_db(&.get_first_value(%(select 1))).should eq(1)
|
||||||
end
|
end
|
||||||
|
@ -124,7 +123,7 @@ describe Database do
|
||||||
rs.next
|
rs.next
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
rescue e : SQLite3::Exception
|
rescue e : SQLite3::Exception
|
||||||
fail("Expected no exception, but got \"#{e.message}\"")
|
fail("Expected no exception, but got \"#{e.message}\"")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue