mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Add note about using $1, $2, etc. for pg driver (#31)
This commit is contained in:
parent
7d30e9f50e
commit
8e3bb19b6d
1 changed files with 1 additions and 0 deletions
|
@ -27,6 +27,7 @@ require "db"
|
|||
require "sqlite3"
|
||||
|
||||
DB.open "sqlite3:./file.db" do |db|
|
||||
# When using the pg driver, use $1, $2, etc. instead of ?
|
||||
db.exec "create table contacts (name string, age integer)"
|
||||
db.exec "insert into contacts values (?, ?)", "John Doe", 30
|
||||
|
||||
|
|
Loading…
Reference in a new issue