54 Commits

Author SHA1 Message Date
Jack Christensen
855b735eae Add log adapters for testing and log15
Make LogLevel a type for Stringer interface.
2017-04-29 20:33:52 -05:00
Jack Christensen
7b1f461ec3 Add simple protocol suuport with (Query|Exec)Ex 2017-04-10 08:58:51 -05:00
James Lawrence
c5d247830c enable sql.Open to support both DSN and URI based connection strings 2017-04-01 08:50:48 -05:00
Terin Stock
1a99c0e5c4 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-22 08:16:09 -05:00
Jack Christensen
bec9bd261b Add database/sql support to pgtype 2017-03-18 21:11:43 -05:00
Jack Christensen
9ab59a74a9 Remove oid constants from pgx 2017-03-18 14:59:34 -05:00
Jack Christensen
ba5f97176a Move not null Oid to pgtype
In preparation to ConnInfo implementation.
2017-03-13 21:34:38 -05:00
Jack Christensen
743b98b298 Name PG types as words
Though this doesn't follow Go naming conventions exactly it makes names more
consistent with PostgreSQL and it is easier to read. For example, TIDOID becomes
TidOid. In addition this is one less breaking change in the move to V3.
2017-03-11 17:03:23 -06:00
Jack Christensen
0a0c086edd Fix broken stdlib tests 2017-03-03 16:46:50 -06:00
Jack Christensen
ed9e8bb168 Remove skip test for missing json type
All supported versions of PostgreSQL now have json type.
2017-03-03 16:08:00 -06:00
Jack Christensen
7fbff4a495 Merge branch 'context' into v3-experimental 2017-02-12 15:13:47 -06:00
Jack Christensen
cc414269c1 Remove debugging Println 2017-02-12 08:12:36 -06:00
Jack Christensen
351eb8ba67 Initial proof-of-concept database/sql context support 2017-02-06 19:39:34 -06:00
Jack Christensen
ecedf3d94a Fix stdlib test logger 2017-01-07 10:16:12 -06:00
Jack Christensen
f895e970b5 Merge branch 'master' into v3-experimental
* master:
  Tweak replication test setup
  Properly make it a func init()
  The naming really matters
  Fix the syntax
  Properly make the replication tests skippable on 9.5 and below
  I forgot the tests are 9.6+
  One more try for travis
  Valid YAML helps.
  Dont break old postgres
  Try to fix travis
  Add the ability to set all the fields in the constructor
  Start replication now wraps the sql and returns errors properly
  It should all be unsigned.
  Capitalization
  Add replication stop mechanism
  Add basic logical replication protocol support
2017-01-06 15:25:57 -06:00
Kris Wehner
edbd30ea6a Add replication stop mechanism 2016-12-06 15:44:37 -08:00
ferhat elmas
84439a13cb Simplify map composite literals as gofmt -s handles 2016-11-09 00:52:10 +01:00
Jack Christensen
214443deb7 Rename Oid to OID 2016-08-02 13:31:55 -05:00
Jack Christensen
a8a990f51b Add test for stdlib query not being logged properly 2016-07-07 07:50:34 -05:00
Akira Chiku
d05661b5ee Fix error message 2016-06-06 22:54:33 +09:00
Jack Christensen
b5901f7dba Fix skip JSON tests for old servers 2015-11-12 15:43:48 -06:00
Jack Christensen
09e0cc4815 Skip JSON tests for old PostgreSQL servers 2015-11-12 15:27:20 -06:00
Jack Christensen
e1215d9b19 []byte skips encoding/decoding
refs #104
2015-11-12 14:54:25 -06:00
Jack Christensen
26bb780063 inet is known type now -- so use point instead 2015-11-12 13:41:00 -06:00
Jack Christensen
69102e4463 test ipv4 for travis simplicity 2015-10-26 19:08:15 -05:00
Jack Christensen
db57394741 test ipv4 for travis simplicity 2015-10-26 18:13:35 -05: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
Jack Christensen
acdf5acc5a Add test for stdlib query nil 2015-04-15 08:01:26 -05:00
Blaž Hrastnik
7f2cbbfcfd Support nil driver.Value 2015-04-13 14:33:16 +09:00
Jack Christensen
d5e170cc0f Add stdlib test for []byte 2014-10-03 14:52:33 -05: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
3761c6335e Ensure db is valid at end of tests 2014-07-19 17:52:36 -05:00
Jack Christensen
3144b5363f Support unknown PostgreSQL types as strings 2014-07-19 17:49:11 -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
ca9128c3b1 Add test for invalid query 2014-06-21 11:39:28 -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