<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/database/sql/driver, branch dev.cmdgo</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>database/sql: close driver.Connector if it implements io.Closer</title>
<updated>2021-02-25T19:34:27+00:00</updated>
<author>
<name>Ivan Trubach</name>
<email>mr.trubach@icloud.com</email>
</author>
<published>2021-02-25T19:15:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=194b636f8f1ff7d6b709b5b9010d1d14b3919e66'/>
<id>194b636f8f1ff7d6b709b5b9010d1d14b3919e66</id>
<content type='text'>
This change allows driver implementations to manage resources in
driver.Connector, e.g. to share the same underlying database handle
between multiple connections. That is, it allows embedded databases
with in-memory backends like SQLite and Genji to safely release the
resources once the sql.DB is closed.

This makes it possible to address oddities with in-memory stores in
SQLite and Genji drivers without introducing too much complexity in
the driver implementations.

See also:
- https://github.com/mattn/go-sqlite3/issues/204
- https://github.com/mattn/go-sqlite3/issues/511
- https://github.com/genjidb/genji/issues/210

Fixes #41790

Change-Id: Idbd19763134438ed38288b9d44f16608e4e97fd7
GitHub-Last-Rev: 962c785dfb3bb6ad98b2216bcedd84ba383fe872
GitHub-Pull-Request: golang/go#41710
Reviewed-on: https://go-review.googlesource.com/c/go/+/258360
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
Trust: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Run-TryBot: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change allows driver implementations to manage resources in
driver.Connector, e.g. to share the same underlying database handle
between multiple connections. That is, it allows embedded databases
with in-memory backends like SQLite and Genji to safely release the
resources once the sql.DB is closed.

This makes it possible to address oddities with in-memory stores in
SQLite and Genji drivers without introducing too much complexity in
the driver implementations.

See also:
- https://github.com/mattn/go-sqlite3/issues/204
- https://github.com/mattn/go-sqlite3/issues/511
- https://github.com/genjidb/genji/issues/210

Fixes #41790

Change-Id: Idbd19763134438ed38288b9d44f16608e4e97fd7
GitHub-Last-Rev: 962c785dfb3bb6ad98b2216bcedd84ba383fe872
GitHub-Pull-Request: golang/go#41710
Reviewed-on: https://go-review.googlesource.com/c/go/+/258360
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
Trust: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Run-TryBot: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql/driver: use correct method name "Connect" in DriverContext docs</title>
<updated>2020-05-30T03:20:54+00:00</updated>
<author>
<name>Brad Erickson</name>
<email>bderickson@gmail.com</email>
</author>
<published>2020-05-30T03:10:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=1ed57c1b720d6ffa8bc8d074aa9a5751a2c81b87'/>
<id>1ed57c1b720d6ffa8bc8d074aa9a5751a2c81b87</id>
<content type='text'>
Change-Id: I755fedebb1f8f4d3f27b2b3f8626bca03bd36c88
GitHub-Last-Rev: 4a123572d55ad3b0104d3e6501eef5b2f37af4cd
GitHub-Pull-Request: golang/go#39305
Reviewed-on: https://go-review.googlesource.com/c/go/+/235518
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I755fedebb1f8f4d3f27b2b3f8626bca03bd36c88
GitHub-Last-Rev: 4a123572d55ad3b0104d3e6501eef5b2f37af4cd
GitHub-Pull-Request: golang/go#39305
Reviewed-on: https://go-review.googlesource.com/c/go/+/235518
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql: document Connect and Close may need a timeout</title>
<updated>2020-04-28T20:42:02+00:00</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2020-04-28T14:31:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=ca854f3cdaa577930b385b61571d5176193b738e'/>
<id>ca854f3cdaa577930b385b61571d5176193b738e</id>
<content type='text'>
Opening a connection with Connect should still create a derived
context with a timeout because some clients will not use a timeout
and the connection pool may open a connection asynchronously.

Likewise, if a connection close makes a network operation it should
provide some type of sane timeout for the operation.

Fixes #38185

Change-Id: I9b7ce2996c81c486170dcc84b12672a99610fa27
Reviewed-on: https://go-review.googlesource.com/c/go/+/230438
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Opening a connection with Connect should still create a derived
context with a timeout because some clients will not use a timeout
and the connection pool may open a connection asynchronously.

Likewise, if a connection close makes a network operation it should
provide some type of sane timeout for the operation.

Fixes #38185

Change-Id: I9b7ce2996c81c486170dcc84b12672a99610fa27
Reviewed-on: https://go-review.googlesource.com/c/go/+/230438
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql/driver: enhance driver package documentation</title>
<updated>2020-04-27T17:36:02+00:00</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2020-04-27T16:48:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=1518123114d12d852d92793bd986e8856ac13e25'/>
<id>1518123114d12d852d92793bd986e8856ac13e25</id>
<content type='text'>
Change-Id: I455acdb71354f14e0bc4104cbd7abd5c89958dd9
Reviewed-on: https://go-review.googlesource.com/c/go/+/230214
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I455acdb71354f14e0bc4104cbd7abd5c89958dd9
Reviewed-on: https://go-review.googlesource.com/c/go/+/230214
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql: add test for Conn.Validator interface</title>
<updated>2020-03-29T02:01:34+00:00</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2020-03-18T17:03:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=5aef51a729f428bfd4b2c28fd2ba7950660608e0'/>
<id>5aef51a729f428bfd4b2c28fd2ba7950660608e0</id>
<content type='text'>
This addresses comments made by Russ after
https://golang.org/cl/174122 was merged. It addes a test
for the connection validator and renames the interface to just
"Validator".

Change-Id: Iea53e9b250c9be2e86e9b75906e7353e26437c5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/223963
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This addresses comments made by Russ after
https://golang.org/cl/174122 was merged. It addes a test
for the connection validator and renames the interface to just
"Validator".

Change-Id: Iea53e9b250c9be2e86e9b75906e7353e26437c5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/223963
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql: process all Session Resets synchronously</title>
<updated>2020-03-17T23:02:30+00:00</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2019-04-26T21:45:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=971f8a2f9a5beb0473f82d7299613c86d2b4a5b9'/>
<id>971f8a2f9a5beb0473f82d7299613c86d2b4a5b9</id>
<content type='text'>
Adds a new interface, driver.ConnectionValidator, to allow
drivers to signal they should not be used again,
separatly from the session resetter interface.
This is done now that the session reset is done
after the connection is put into the connection pool.

Previous behavior attempted to run Session Resets
in a background worker. This implementation had two
problems: untested performance gains for additional
complexity, and failures when the pool size
exceeded the connection reset channel buffer size.

Fixes #31480

Change-Id: I7d483b883c24a362c292471e87a88db5b204d1d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/174122
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Run-TryBot: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a new interface, driver.ConnectionValidator, to allow
drivers to signal they should not be used again,
separatly from the session resetter interface.
This is done now that the session reset is done
after the connection is put into the connection pool.

Previous behavior attempted to run Session Resets
in a background worker. This implementation had two
problems: untested performance gains for additional
complexity, and failures when the pool size
exceeded the connection reset channel buffer size.

Fixes #31480

Change-Id: I7d483b883c24a362c292471e87a88db5b204d1d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/174122
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Run-TryBot: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql: add support for decimal interface</title>
<updated>2019-06-13T16:59:01+00:00</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2019-04-26T19:49:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=683ffe09f66f0834baf039deeabe16eec6b09daa'/>
<id>683ffe09f66f0834baf039deeabe16eec6b09daa</id>
<content type='text'>
Add support for scanning decimal types into values. If the dest
supports the decimal composer interface and the src supports
the decimal decomposer, set the value of the decimal when Scanning.

Add support for sending decimal decomposer interface values
as parameters.

For #30870

Change-Id: Ic5dbf9069df8d56405852b17542a9188d55c2947
Reviewed-on: https://go-review.googlesource.com/c/go/+/174181
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for scanning decimal types into values. If the dest
supports the decimal composer interface and the src supports
the decimal decomposer, set the value of the decimal when Scanning.

Add support for sending decimal decomposer interface values
as parameters.

For #30870

Change-Id: Ic5dbf9069df8d56405852b17542a9188d55c2947
Reviewed-on: https://go-review.googlesource.com/c/go/+/174181
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql/driver: document Valuer must not panic</title>
<updated>2019-06-13T02:49:03+00:00</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2019-04-05T17:33:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=73abea300a89f0a9b801a4662e3688a5747f1859'/>
<id>73abea300a89f0a9b801a4662e3688a5747f1859</id>
<content type='text'>
While it is possible for the connection pool to guard against panics
on every valuer read, this seems like a high cost to be added,
in both code complexity and possible runtime performance.

Most uses of the Valuer will be trivial, like returning
a struct field. Optimize for that case. If sometime may panic the
valuer should itself use recover and return an error.

Fixes #26332

Change-Id: Iad18780b8028f669f5a7841b74a5384d62fb6a7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/170700
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While it is possible for the connection pool to guard against panics
on every valuer read, this seems like a high cost to be added,
in both code complexity and possible runtime performance.

Most uses of the Valuer will be trivial, like returning
a struct field. Optimize for that case. If sometime may panic the
valuer should itself use recover and return an error.

Fixes #26332

Change-Id: Iad18780b8028f669f5a7841b74a5384d62fb6a7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/170700
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql: fix comment grammar</title>
<updated>2019-03-07T05:19:01+00:00</updated>
<author>
<name>Andrei Matei</name>
<email>andrei@cockroachlabs.com</email>
</author>
<published>2019-03-04T00:44:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=9e72e604a647c5e782308a91fdc6a6fd099346c4'/>
<id>9e72e604a647c5e782308a91fdc6a6fd099346c4</id>
<content type='text'>
Change-Id: I92d8c93967c5ec57f07151affd0041f00e405057
GitHub-Last-Rev: 2dea977d938a504604aed6a9ae87986001f96acd
GitHub-Pull-Request: golang/go#30551
Reviewed-on: https://go-review.googlesource.com/c/go/+/164970
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I92d8c93967c5ec57f07151affd0041f00e405057
GitHub-Last-Rev: 2dea977d938a504604aed6a9ae87986001f96acd
GitHub-Pull-Request: golang/go#30551
Reviewed-on: https://go-review.googlesource.com/c/go/+/164970
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>database/sql/driver: fix typo</title>
<updated>2019-02-15T17:23:55+00:00</updated>
<author>
<name>Zhou Peng</name>
<email>p@ctriple.cn</email>
</author>
<published>2019-02-15T08:41:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=4c89a10fb9f4fcb2ed01b6e7325e53b4bc487fc2'/>
<id>4c89a10fb9f4fcb2ed01b6e7325e53b4bc487fc2</id>
<content type='text'>
Change-Id: I6e7035db4b3e2a09e5655eb7646eea9d99fb7118
Reviewed-on: https://go-review.googlesource.com/c/162917
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I6e7035db4b3e2a09e5655eb7646eea9d99fb7118
Reviewed-on: https://go-review.googlesource.com/c/162917
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
