mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
allow scalar to return custom types
This commit is contained in:
parent
34ae9d5775
commit
b2da4f3f6e
3 changed files with 9 additions and 20 deletions
|
@ -197,6 +197,13 @@ describe DB do
|
|||
end
|
||||
end
|
||||
|
||||
it "drivers should return custom values as scalar" do
|
||||
DB.open("foo://host") do |db|
|
||||
FooDriver.fake_row = [FooValue.new(3), FooValue.new(99)] of FooDriver::Any
|
||||
db.scalar("query").as(FooValue).value.should eq(3)
|
||||
end
|
||||
end
|
||||
|
||||
it "Foo and Bar drivers should not implement each other read" do
|
||||
with_witness do |w|
|
||||
DB.open("foo://host") do |db|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue