sqlx
sqlx copied to clipboard
general purpose extensions to golang's database/sql
Correcting Smuth to Smith - unsure if this is a typo or just poking fun at the Kiwi accent?
I reached out to @jmoiron on Gopher Slack recently. He asked me to open up an issue. I presented an issue that this code is not working as expected: http://play.golang.org/p/yvwh5eoiLZ...
It seems like NamedQueryContext and NamedQuery are not returning errors when an insert fails when using a CTE. Small example as follows ``` query := ` WITH inserted AS (...
Cassandra gaining popularity with it's CQL (that really similar to SQL). It's currently rank 2 nosql database after mongodb.
is there any way for a string to become an sqlx.Row? Here's a minimal reproduction with a database reproduction ```sql create table chats ( id serial primary key, name varchar(255)...
I'm using the SelectContext method, and trying to timeout the context to cancel indefinitely running queries. It appears that the timeout is not respected, and the goroutine hangs forever. It...
Just found that I needed to import the database/sql package in order to get access to the list of registered drivers via sql.Dtivers(). I may have misunderstood, but I _thought_...
Transaction insertion issue If using transactions to insert different tables multiple times and using RETURNING ID, second insertion will result in an error Insert INTO db1 (id, name) values (1,'name1...
The JSON type column in the table may be `null`. How can I scan return nil? Code like: ```golang // table struct type TableName struct { Id int `json:"id" db:"id"`...
code: ``` driverName, err := otelsql.Register("mysql", otelsql.WithAttributes( semconv.DBSystemMySQL, semconv.DBNameKey.String(a.dbName), )) a.db, err = sqlx.Connect(driverName, a.dsn) if err != nil { return err } a.db.SetMaxIdleConns(32) a.db.SetMaxOpenConns(1024) ``` logs: metrics:  QPS...