mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-08 14:15:36 -05:00
1. `sql/database` provides a `Scan()`interface to scan query results into typed variables. Therefore we have to create a slice of typed variables (types retrieved from rows.ColumnTypes()) to pass them into `Scan()`. Using []byte works but makes the printing result different from other tools (e.g [1] instead of %!s(int32=1)] 2. MS SQL supports both named (e.g @name) and positional args (e.g @p2), so we have to check if the name is contained in the original statement before passing them into `db.Query()` as either named arg or as values.