Commit Graph

27 Commits (2e4ef2f4fa39ceaff290f79a3379cf5570bb49c7)

Author SHA1 Message Date
Jack Christensen cd16be9308 Close database/sql connections created through ConnPool
database/sql driver created through stdlib.OpenFromConnPool closes connections
when requested by database/sql rather than release to underlying connection
pool.
2017-06-08 19:14:03 -05:00
James Lawrence ef857b600f enable sql.Open to support both DSN and URI based connection strings 2017-03-31 20:09:18 -04:00
Terin Stock a3e7718743
fix(stdlib): lock openFromConnPoolCount while using
Locks the `openFromConnPoolCount` counter while formatting the driver
name and incrementing to avoid a data race of multiple goroutines
modifying the counter and registering the same name. `sql.Register`
panics if a driver name has already been registered.
2017-03-20 14:20:05 -07:00
ferhat elmas 84439a13cb Simplify map composite literals as gofmt -s handles 2016-11-09 00:52:10 +01:00
Akira Chiku d05661b5ee Fix error message 2016-06-06 22:54:33 +09:00
Samuel Stauffer a56e35ad0a Support decoding of TimestampOid in stdlib driver 2015-08-25 17:33:17 -07:00
Rick Snyder 6413491657 Add support for specifying sslmode in connection strings
Add tests for sslmode parameter when calling ParseURI.  Fix existing tests to work since default sslmode is 'prefer'

Make sure we default to prefer if sslmode is not provided in ParseDSN

Fix existing tests for ParseDSN to expect TLS configuration for prefer since prefer is the default sslmode; also, add tests for ParseDSN when specifying sslmode parameter on connection string
2015-08-19 11:33:12 -04:00
Jack Christensen db5300358a Allow ConnPool to have MaxConnections of 1 2015-05-25 09:54:56 -05:00
Blaž Hrastnik 7f2cbbfcfd Support nil driver.Value 2015-04-13 14:33:16 +09:00
Jack Christensen e29574d447 Add support for integer, float and text arrays
Restructure internals a bit so pgx/stdlib can turn off binary encoding and
receive text back for array types.
2014-07-26 15:03:52 -05:00
Jack Christensen f7171f34e7 Add docs for pgx/stdlib 2014-07-14 08:16:03 -05:00
Jack Christensen ec82bc9d1e Fix stdlib 2014-07-14 07:58:37 -05:00
Jack Christensen 19537badff Add Rows.Values 2014-07-11 16:55:45 -05:00
Jack Christensen 646136fb44 Rename *Rows.NextRow to *Rows.Next
Conform closer to database/sql
2014-07-11 08:26:01 -05:00
Jack Christensen d7529600e0 Rename QueryResult to Rows
This helps conform closer to database/sql
2014-07-11 08:21:29 -05:00
Jack Christensen 43dcd47a92 Move to Scan interface
Remove SelectValue
2014-07-05 18:23:19 -05:00
Jack Christensen d30ef1b8b9 Replace SelectFunc with Query as core 2014-06-28 17:07:31 -05:00
Jack Christensen b6ac3ef2b0 Rename Execute to Exec 2014-06-27 14:56:27 -05:00
Jack Christensen 3892d8bd70 Use buffered chan for stdlib.Rows
Improved performance slightly
2014-06-21 19:50:59 -05:00
Jack Christensen b1834a527d Fix prepared statement performance with database/sql 2014-06-21 18:28:56 -05:00
Jack Christensen 66df58136d Conn Close should release if from pool 2014-06-21 17:38:47 -05:00
Jack Christensen bdb5387646 Fix Open with OpenFromConnPool 2014-06-21 17:33:30 -05:00
Jack Christensen 09b9964ca7 Add OpenFromConnPool 2014-06-21 11:34:56 -05:00
Jack Christensen eb85aad21f Conn implements driver.Execer and driver.Queryer 2014-06-21 10:06:45 -05:00
Jack Christensen b2c1a14fcc Update github.com/JackC to github.com/jackc 2014-06-21 08:36:20 -05:00
Jack Christensen d9522a4741 Inform database/sql when connections die 2014-06-20 16:33:51 -05:00
Jack Christensen c0e8563b8c Add initial database/sql support 2014-06-20 14:05:16 -05:00