Jack Christensen
2263521f70
Only have a single Begin transaction method
2019-04-24 13:35:27 -05:00
Jack Christensen
1b8f0016e9
Split pgtype into own repo
2019-04-20 19:20:00 -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
66625e6489
Prepare takes context
...
Also remove PrepareEx. It's primary usage was for context. Supplying
parameter OIDs is unnecessary when you can type cast in the query SQL.
If it does become necessary or desirable to add options back it can be
added in a backwards compatible way by adding a varargs as last
argument.
2019-04-20 11:47:16 -05:00
Jack Christensen
dc699cefc7
Conn.CopyFrom takes context
2019-04-20 11:38:23 -05:00
Jack Christensen
54c6ddc2f0
Commit and Rollback take context
...
Remove Ex versions.
2019-04-10 12:22:12 -05:00
Jack Christensen
7718ee6207
Remove Ex versions of Query and QueryRow
...
Always require context and prepend options to arguments if necessary.
2019-04-10 12:12:22 -05:00
Jack Christensen
77a2da2b46
Replace connection pool
2019-04-10 11:09:42 -05:00
Jack Christensen
d3a2c1c107
Partial conversion of pgx to use pgconn
2019-01-26 16:46:30 -06:00
Jack Christensen
89c3d8af5d
Remove ExecEx
2019-01-02 12:52:37 -06:00
Jack Christensen
c672c0d595
Use environment variables for test configuration
2018-12-30 21:52:33 -06:00
Jack Christensen
73f496d7de
Finish core batch operations
2017-06-03 11:49:27 -05:00
Jack Christensen
280bce7078
Added log adapter for logrus
...
Also changed standard logger interface to take a map instead of varargs for
extra data.
2017-04-29 21:28:38 -05:00
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
94749e580f
Remove CopyTo
2017-03-17 14:18:25 -05:00
Jack Christensen
26d57356f7
Remove old Scanner and Encoder system
2017-03-12 17:22:04 -05:00
Jack Christensen
93e5c68f69
Merge branch 'master' into v3-experimental
2016-12-10 12:21:08 -06:00
Jack Christensen
5f7d01778e
Add CopyTo to support PostgreSQL copy protocol
...
fixes #102
2016-08-10 16:27:44 -05:00
Jack Christensen
390f75c0e1
Reduce Logger interface to Log method
2016-08-02 14:42:31 -05:00
Jack Christensen
06c803253c
Add basic benchmark for ConnPoolQueryRow
2016-02-13 13:12:21 -06:00
Jack Christensen
23c48c2f87
Add trace logging
2015-09-16 08:40:01 -05:00
Jack Christensen
a2e078597b
Add logging to rxMsg
...
Also benchmark what a log call costs
2015-09-14 10:25:48 -05:00
Jack Christensen
057da9f8e7
Add benchmarks for logging
2015-09-14 10:01:05 -05:00
Jack Christensen
73135865e7
Add benchmarks for NullX vs pointer to pointer
2015-09-08 12:08:20 -05:00
Jack Christensen
43dcd47a92
Move to Scan interface
...
Remove SelectValue
2014-07-05 18:23:19 -05:00
Jack Christensen
5b345e80e1
Remove SelectValueTo
...
Benchmarks revealed that it is no longer performant enough to pull
its own wait. Using go_db_bench to copy JSON results to HTTP responses
it was ~20% *slower* for ~4BK responses and less than 10% faster for
+1MB responses.
The the performance problem was in io.CopyN / io.Copy. io.Copy
allocates a 32KB buffer if it doesn't have io.WriterTo or io.ReaderFrom
available. This extra alloc on every request was more expensive than
just reading the result into a string and writing it out to the response
body.
Tests indicated that if MsgReader implemented a custom Copy that used a
shared buffer it might have a few percent performance advantage. But the
additional complexity is not worth the performance gain.
2014-07-05 09:32:47 -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
b2c1a14fcc
Update github.com/JackC to github.com/jackc
2014-06-21 08:36:20 -05:00
Jack Christensen
73b5c73c1c
Do not share database connections between tests
2014-06-20 15:18:55 -05:00
Jack Christensen
6d6fb4561a
ConnPoolConfig embeds ConnConfig
2014-05-19 07:59:51 -05:00
Jack Christensen
9067b2d991
Rename ConnectionPoolOptions to ConnPoolConfig
2014-05-17 13:44:55 -05:00
Jack Christensen
f9a2501100
Rename ConnectionPool to ConnPool
2014-05-17 13:40:50 -05:00
Jack Christensen
1ff653ae15
Rename ConnectionParameters to ConnConfig
2014-05-17 13:38:13 -05:00
Jack Christensen
4eb597d20b
Rename pgx.Connection to pgx.Conn
2014-05-17 13:11:30 -05:00
Jack Christensen
75ca2b3b1c
Remove unnecessary read
...
* Add benchmark for SelectValueTo
2014-04-25 13:49:36 -06:00
Jack Christensen
622ff142ca
Add error to *ConnectionPool.Acquire return
2013-07-25 07:52:05 -05:00
Jack Christensen
7450854d50
Add benchmark of ConnectionPool Acquire/Release
2013-07-25 07:34:38 -05:00
Jack Christensen
36904168b2
Don't panic!
2013-07-20 13:07:30 -05:00
Jack Christensen
9e321af35c
Add binary encoding for timestamptz
2013-07-19 14:40:07 -05:00
Jack Christensen
9640dc91e4
Make getSharedConnection private again
2013-07-16 08:32:49 -05:00
Jack Christensen
bae49077ce
Use pgx_test package for tests
2013-07-16 08:29:59 -05:00
Jack Christensen
1af652ce07
More docs and make ValueTranscoder visible.
2013-07-15 17:45:20 -05:00
Jack Christensen
df0a537f59
Make Oid public
2013-07-15 08:28:33 -05:00
Jack Christensen
98d4ce4c09
DRYed test and benchmark
2013-07-13 19:23:13 -05:00
Jack Christensen
8afcde41f2
Start factoring test helpers out
2013-07-13 17:29:24 -04:00
Jack Christensen
c69e638f68
Added (remove|restore)BinaryEncoders
...
Makes it so the oid doesn't have to be hard coded into text
benchmarks that disable binary encoding.
2013-07-12 18:21:40 -04:00
Jack Christensen
53da3bb789
Use binary encoding for bool
2013-07-12 18:02:23 -04:00
Jack Christensen
8c7ea78485
Add binary decoding for floats
2013-07-11 12:42:17 -04:00
Jack Christensen
a1c24661cd
Added binary encoding for int2
2013-07-08 18:11:10 -05:00