Jacob Powers
6d62aec6b1
remove irrelevant test from pgx
2020-06-09 18:31:49 -07:00
Jacob Powers
96f49eb89b
copy travis configs over from pgx
2020-06-09 18:16:23 -07:00
Jacob Powers
3e586004db
add travis config
2020-06-09 18:08:38 -07:00
Jack Christensen
e32805888d
Merge pull request #35 from georgysavva/scan-into-interface-dst
...
Make it possible to scan destination of *interface{} type.
2020-06-08 13:14:01 -05:00
georgysavva
a6d42976c6
Make it possible to scan destination of *interface{} type.
2020-06-08 13:18:54 +03:00
Jack Christensen
1f68908da6
Update changelog
2020-06-06 11:09:32 -05:00
Jack Christensen
59a28af6de
Update dependencies
2020-06-06 11:00:22 -05:00
Jack Christensen
9b79c87d64
Update changelog
2020-06-06 10:59:27 -05:00
Jack Christensen
59a0074b0a
Release v1.6.0
2020-06-06 10:52:55 -05:00
Jack Christensen
6cd2127b96
Update pgproto3 dependency
2020-06-06 10:52:07 -05:00
Jack Christensen
2758cbc0c4
Remove unnecessary allocation in rows.Values()
...
This was originally done to fix #386 . But subsequent changes to pgtype
render the allocation unnecessary. Tests put in place with the original
fix still pass.
2020-06-06 10:39:33 -05:00
Jack Christensen
36944b232f
Fix hstore with empty string values
2020-06-06 10:26:34 -05:00
Jack Christensen
937aec9841
Fix tests with newest pgx
2020-06-06 09:55:14 -05:00
Jack Christensen
4e50623069
Fix stdlib number size conversions
2020-06-06 09:54:19 -05:00
Jack Christensen
81140f6c27
Improve stdlib performance with large results
2020-06-06 09:49:14 -05:00
Jack Christensen
f6355165a9
Remove superfluous argument from ScanPlan
2020-06-06 09:10:11 -05:00
Jack Christensen
91a46ce219
Clarify and normalize Value semantics
...
Previously, Get implicitly allowed returning a reference to an internal
value (e.g. a []byte) but AssignTo was documented as requiring a deep
copy.
This inconsistency meant that either Get was unsafe or the deep copy in
AssignTo was superfluous. In addition, Scan into a []byte skips going
through Bytea and returns a []byte of the unparsed bytes directly. i.e.
a reference not a copy.
Standardize on allowing Get and AssignTo to return internal references
but require a Value never mutate internal values - only replace them.
2020-06-06 08:34:56 -05:00
Jack Christensen
73d0ac206c
Merge pull request #768 from georgysavva/fix-exposed-config
...
Fix exposed config
2020-06-06 07:05:13 -05:00
Jack Christensen
43e4070cb4
Better CompositeType and ArrayType Get implementation
2020-06-05 13:40:03 -05:00
leighhopcroft
f2a2797a88
support NaN in Numeric encode and decode methods
2020-06-02 20:14:51 +01:00
leighhopcroft
b708c8b985
support NaN in Numeric.AssignTo
2020-06-02 19:07:10 +01:00
leighhopcroft
3cbb81631a
added NaN support to Numeric.Set
2020-06-02 18:35:58 +01:00
georgysavva
e29ce9f6d6
Add Config.Copy() in pgx and pgxpool packages. Conn.Config() and Pool.Config() return copy of the original config.
2020-06-02 13:35:05 +03:00
Jack Christensen
fa742c5248
Merge pull request #41 from georgysavva/add-config-copy
...
Add Config.Copy() method that returns a smart copy of the config.
2020-06-01 13:11:01 -05:00
georgysavva
a6d9265506
Implement deep copy manually, stop using an external deep copy library. Add comment to the Config.Copy() method.
2020-06-01 20:52:08 +03:00
georgysavva
608451a215
Store original config in Conn before updating it.
2020-06-01 19:38:12 +03:00
georgysavva
8d541d0004
Add Config.Copy() method that return a smart copy of the config.
2020-06-01 19:20:17 +03:00
Jack Christensen
0e04d8187e
Add raw benchmark
2020-06-01 08:53:45 -05:00
Jack Christensen
4b95a747d7
Use pgtype.NewValue instead of reflect for Values()
...
This is both cleaner and necessary for pgtype.TypeValue types.
2020-05-30 13:32:15 -05:00
Jack Christensen
8dee3382f7
Improve unknown type support for database/sql
...
- Return unknown type OID instead of empty string for type name.
- ScanType is string instead of empty interface for unknown types.
fixes #759
2020-05-30 13:27:25 -05:00
Jack Christensen
837704dc7d
Update stdlib docs to point to Conn.Raw instead of AcquireConn
2020-05-30 13:27:25 -05:00
Jack Christensen
2bd26ec7fa
Expose stdlib.Conn.Conn() to enable database/sql.Conn.Raw()
2020-05-30 13:27:25 -05:00
Jack Christensen
e6c101413b
Merge pull request #761 from ikozinov/rows-close-logger
...
Added err field because log output is a bit confusing since it is not clear what error occurred
2020-05-27 08:48:22 -05:00
Igor V. Kozinov
4043edafe7
Add error field to logger on rows close
2020-05-27 14:44:53 +06:00
Jack Christensen
9e1a67c1bc
Wait longer in timing sensitive test
...
Less likely to fail on CI.
2020-05-25 12:04:01 -05:00
Jack Christensen
2647eff567
Fix ValidateConnect with cancelable context
...
fixes #40
2020-05-25 11:49:37 -05:00
Jack Christensen
e318c27e26
Merge branch 'jordanlewis-send-batch-simple'
2020-05-25 11:37:52 -05:00
Jack Christensen
72bba7fb42
Move batch simple protocol test to batch_test.go
2020-05-25 11:36:18 -05:00
Jack Christensen
8bad186207
Avoid race between close conn and cancel ctx
2020-05-25 11:35:20 -05:00
Jack Christensen
3ec395d4ef
Merge branch 'send-batch-simple' of git://github.com/jordanlewis/pgx into jordanlewis-send-batch-simple
2020-05-25 11:26:16 -05:00
Jack Christensen
bcdbb9f657
Tweak benchmarks to account for slow binary formats
...
See https://www.postgresql.org/message-id/CAMovtNoHFod2jMAKQjjxv209PCTJx5Kc66anwWvX0mEiaXwgmA%40mail.gmail.com
2020-05-25 11:18:11 -05:00
Jordan Lewis
25099e6f89
Permit SendBatch with Simple Protocol
...
This commit adds support for sending batches of queries via the Simple
protocol with SendBatch. The result appears identically to how it would
if it were created with the extended protocol.
2020-05-25 01:37:48 -04:00
Jack Christensen
8c33aa2443
Remove CPU wasting empty default statement
...
fixes #39
2020-05-23 11:47:42 -05:00
Jack Christensen
9d847241cb
Merge pull request #29 from pmorelli92/master
...
Add the possibility of assigning a TID to a string
2020-05-21 09:46:10 -05:00
Pablo Morelli
afff6abc6c
TID AssignTo string
2020-05-20 15:01:21 +02:00
Jack Christensen
2ccb66fe21
Doc fix
2020-05-16 18:48:05 -05:00
Jack Christensen
8faa1f5096
Fix off by one error with number of rows benchmark
2020-05-16 18:43:22 -05:00
Jack Christensen
b19811bbeb
Merge branch 'georgysavva-store-connection-string'
2020-05-16 18:14:24 -05:00
Jack Christensen
ac6c49c39d
Require access to ConnString via Config
...
A Config object may be created via ParseConfig and then further
modified. Requiring access to the original ConnString via the Config
helps indicate that the Config is the source of truth as to how the
connection was actually established.
2020-05-16 18:12:04 -05:00
Jack Christensen
59a2185dfb
Merge branch 'store-connection-string' of git://github.com/georgysavva/pgx into georgysavva-store-connection-string
2020-05-16 18:07:27 -05:00