mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
update Slice(UInt8) to Bytes
This commit is contained in:
parent
11e24e1c65
commit
8025ecaa13
5 changed files with 17 additions and 17 deletions
|
@ -101,9 +101,9 @@ describe DummyDriver do
|
|||
db.query("az,AZ") do |rs|
|
||||
rs.move_next
|
||||
ary = [97u8, 122u8]
|
||||
rs.read(Slice(UInt8)).should eq(Slice.new(ary.to_unsafe, ary.size))
|
||||
rs.read(Bytes).should eq(Bytes.new(ary.to_unsafe, ary.size))
|
||||
ary = [65u8, 90u8]
|
||||
rs.read(Slice(UInt8)).should eq(Slice.new(ary.to_unsafe, ary.size))
|
||||
rs.read(Bytes).should eq(Bytes.new(ary.to_unsafe, ary.size))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -134,9 +134,9 @@ describe DummyDriver do
|
|||
it "executes and selects blob" do
|
||||
with_dummy do |db|
|
||||
ary = UInt8[0x53, 0x51, 0x4C]
|
||||
slice = Slice.new(ary.to_unsafe, ary.size)
|
||||
slice = Bytes.new(ary.to_unsafe, ary.size)
|
||||
DummyDriver::DummyResultSet.next_column_type = typeof(slice)
|
||||
(db.scalar("?", slice) as Slice(UInt8)).to_a.should eq(ary)
|
||||
(db.scalar("?", slice).as(Bytes)).to_a.should eq(ary)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue