Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Go
/
Go
A repository must bind a slice safely into an SQL `IN` clause and support PostgreSQL plac…
from Go
advanced
1 min
A repository must bind a slice safely into an SQL `IN` clause and support PostgreSQL placeholders. Which sequence is correct?
Use `sqlx.In` to expand placeholders and arguments, then call `db.Rebind` before execution.
Join values into the SQL string, then quote the complete query with `fmt.Sprintf`.
Pass the slice as one `?` argument; every driver expands it automatically.
Check
Ask AI about this kata
Report an error
previous kata
An `io.Reader` returns `n > 0` and `err == io.EOF` in the same call. What should the call…
Quiz
A new version is available
Reload