mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Update README.md and docs for dynamic args (#117)
This commit is contained in:
parent
7e83f8e26c
commit
f128d6ddf3
2 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ DB.open "sqlite3:./file.db" do |db|
|
||||||
args = [] of DB::Any
|
args = [] of DB::Any
|
||||||
args << "Sarah"
|
args << "Sarah"
|
||||||
args << 33
|
args << 33
|
||||||
db.exec "insert into contacts values (?, ?)", args
|
db.exec "insert into contacts values (?, ?)", args: args
|
||||||
|
|
||||||
puts "max age:"
|
puts "max age:"
|
||||||
puts db.scalar "select max(age) from contacts" # => 33
|
puts db.scalar "select max(age) from contacts" # => 33
|
||||||
|
|
|
@ -56,7 +56,7 @@ require "uri"
|
||||||
# args = [] of DB::Any
|
# args = [] of DB::Any
|
||||||
# args << "Sarah"
|
# args << "Sarah"
|
||||||
# args << 33
|
# args << 33
|
||||||
# db.exec "insert into contacts values (?, ?)", args
|
# db.exec "insert into contacts values (?, ?)", args: args
|
||||||
#
|
#
|
||||||
# puts "max age:"
|
# puts "max age:"
|
||||||
# puts db.scalar "select max(age) from contacts" # => 33
|
# puts db.scalar "select max(age) from contacts" # => 33
|
||||||
|
|
Loading…
Reference in a new issue