mirror of
https://gitea.invidious.io/iv-org/shard-crystal-sqlite3.git
synced 2024-08-15 00:53:26 +00:00
Add sample_value specs
Unify style for sql queries
This commit is contained in:
parent
51364e2512
commit
be5ceaa0bf
2 changed files with 12 additions and 10 deletions
|
@ -34,7 +34,9 @@ DB::DriverSpecs(DB::Any).run do
|
|||
sample_value 1.5_f32, "float", "1.5", type_safe_value: false
|
||||
sample_value 1.5, "float", "1.5"
|
||||
sample_value Time.utc(2016, 2, 15), "text", "'2016-02-15 00:00:00.000'", type_safe_value: false
|
||||
sample_value Time.utc(2016, 2, 15, 10, 15, 30), "text", "'2016-02-15 10:15:30'", type_safe_value: false
|
||||
sample_value Time.utc(2016, 2, 15, 10, 15, 30), "text", "'2016-02-15 10:15:30.000'", type_safe_value: false
|
||||
sample_value Time.utc(2016, 2, 15, 10, 15, 30, nanosecond: 123000000), "text", "'2016-02-15 10:15:30.123'", type_safe_value: false
|
||||
sample_value Time.local(2016, 2, 15, 7, 15, 30, location: Time::Location.fixed("fixed", -3*3600)), "text", "'2016-02-15 10:15:30.000'", type_safe_value: false
|
||||
|
||||
ary = UInt8[0x53, 0x51, 0x4C, 0x69, 0x74, 0x65]
|
||||
|
|
|
@ -16,7 +16,7 @@ describe SQLite3::ResultSet do
|
|||
it "reads string data types" do
|
||||
with_db do |db|
|
||||
db.exec "CREATE TABLE test_table (test_text text)"
|
||||
db.exec "INSERT INTO test_table(test_text) VALUES (?), (?)", "abc", "123"
|
||||
db.exec "INSERT INTO test_table (test_text) values (?), (?)", "abc", "123"
|
||||
db.query("SELECT test_text FROM test_table") do |rs|
|
||||
rs.each do
|
||||
rs.read.should match(/abc|123/)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue