Jack Christensen
3028821487
Add context.Context to Logger interface
...
This allows custom logger adapters to add additional fields to log
messages. For example, a HTTP server may with to log the request ID.
fixes #428
2019-08-03 16:16:21 -05:00
Jack Christensen
7b1272d254
Add SendBatch to pool
2019-04-25 15:07:35 -05:00
Jack Christensen
aed6b822d9
Split batch command and result
2019-04-24 16:39:06 -05:00
Jack Christensen
7b4e145e7c
Remove Batch.die
2019-04-24 16:03:50 -05:00
Jack Christensen
3795c7131a
Remove unused Batch.ctx
2019-04-24 16:02:23 -05:00
Jack Christensen
044a55ad2c
Remove unused Batch.resultsRead
2019-04-24 13:44:25 -05:00
Jack Christensen
187157e773
Remove unused Batch.inTx
2019-04-24 13:43:37 -05:00
Jack Christensen
d5c510b590
Remove unused Batch field
2019-04-24 13:40:54 -05:00
Jack Christensen
1b8f0016e9
Split pgtype into own repo
2019-04-20 19:20:00 -05:00
Jack Christensen
cc3461e65d
Use golang.org/x/xerrors
2019-04-20 17:43:44 -05:00
Jack Christensen
efb333df6b
Fix go modules
...
Wow. This is fun. Sure is easy to get modules wrong when upgrading a v2+
project.
2019-04-20 17:41:08 -05:00
Jack Christensen
1f010f412d
Simplify Batch.Queue for prepared statements
2019-04-20 11:29:28 -05:00
Jack Christensen
af1beca9a5
Update pgconn to resolve batch deadlock issue
2019-04-20 11:27:43 -05:00
Jack Christensen
ae73ca2da1
Update to more effecient pgconn
2019-04-19 15:55:45 -05:00
Jack Christensen
938ee9f434
Rows and Row are now interfaces
2019-04-11 17:58:16 -05:00
Jack Christensen
acd15cf589
Remove some obsolete context handling
2019-04-10 14:25:06 -05:00
Jack Christensen
77a2da2b46
Replace connection pool
2019-04-10 11:09:42 -05:00
Jack Christensen
858d00788a
Use extracted packages with Go modules
2019-04-05 10:59:47 -05:00
Jack Christensen
bd181764bf
Remove ensureConnectionReadyForQuery
2019-02-02 13:00:31 -06:00
Jack Christensen
5cb17c5859
Remove unused method
2019-02-02 11:52:25 -06:00
Jack Christensen
d3a2c1c107
Partial conversion of pgx to use pgconn
2019-01-26 16:46:30 -06:00
Jack Christensen
e78fd95296
Fix switching CommandTag back to string
2019-01-05 18:53:07 -06:00
Jack Christensen
7f9540438c
pgx uses pgconn.CommandTag instead of own definition
2019-01-01 16:55:48 -06:00
Jack Christensen
1ff8024df9
Access underlying net.Conn via method
...
Also remove some dead code.
2018-12-31 18:00:08 -06:00
Jack Christensen
b63370e5d5
Rename base.Conn to base.PgConn
...
- pgx.Conn embeds base.PgConn privately
- Add pgx.Conn.ParameterStatus
2018-12-28 12:16:50 -06:00
Jack Christensen
2e72ca854a
First extraction of base.Conn
2018-11-10 18:48:43 -06:00
Jack Christensen
f5c7ef0957
Add docs regarding Batch.Send deadlock potential
...
refs #374
2018-01-15 10:37:16 -06:00
Jack Christensen
5789af0b64
Add doc for (*Tx) BeginBatch()
2017-09-25 11:01:30 -05:00
Gaspard Douady
554a4d08ec
Merge branch 'master' into master
2017-09-25 10:41:52 +02:00
Gaspard Douady
38e2b9d449
New beginBatch on transaction object
...
A batch on a tx object does not open and close a transaction itself and
instead use the tx object to ensure the transactionality of the batch
remove unused boolean 'sent' in batch struct
2017-09-25 10:36:41 +02:00
Jack Christensen
53e5d8e341
Fix incomplete selects during batch
...
An incompletely read select followed by an insert would fail. This was
caused by query methods in the non-batch path always calling
ensureConnectionReadyForQuery. This ensures that connections interrupted
by context cancellation are still usable. However, in the batch case
query methods are not being called while reading the result. A
incompletely read select followed by another select would not manifest
this error due to it starting by reading until row description. But when
an incomplete select (which even a successful QueryRow would be
considered) is followed by an Exec, the CommandComplete message from the
select would be considered as the response to the subsequent Exec.
The fix is the batch tracking whether a CommandComplete is pending and
reading it before advancing to the next result. This is similar in
principle to ensureConnectionReadyForQuery, just specific to Batch.
2017-09-21 11:19:52 -05:00
Jack Christensen
79517aaa0e
Fix batch query with query syntax error
2017-07-21 15:22:32 -05:00
Jack Christensen
27ab289096
Use Go casing convention for OID
2017-06-03 11:53:49 -05:00
Jack Christensen
73f496d7de
Finish core batch operations
2017-06-03 11:49:27 -05:00
Jack Christensen
fe0af9b357
Happy-path batch query mode
2017-06-02 14:54:17 -05:00