mirror of
https://gitea.invidious.io/iv-org/shard-crystal-sqlite3.git
synced 2024-08-15 00:53:26 +00:00
TEXT can always be read back as a String
If you store something like "1234" in a STRING field, SQLite will return an Int64. Better to be more specific, for uses who play around with the example code. See crystal-lang/crystal-db#49.
This commit is contained in:
parent
adf64daa08
commit
8cdf5e15ae
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ dependencies:
|
|||
require "sqlite3"
|
||||
|
||||
DB.open "sqlite3://./data.db" do |db|
|
||||
db.exec "create table contacts (name string, age integer)"
|
||||
db.exec "create table contacts (name text, age integer)"
|
||||
db.exec "insert into contacts values (?, ?)", "John Doe", 30
|
||||
|
||||
args = [] of DB::Any
|
||||
|
|
Loading…
Reference in a new issue