Commit Graph

792 Commits (e5707023cac7c07342b8c910e480d09a1caaf6ee)

Author SHA1 Message Date
Jack Christensen e5707023ca Move bool to pgtype 2017-02-24 14:10:56 -06:00
Jack Christensen bb764d2129 Add Int2 test 2017-02-24 13:45:05 -06:00
Jack Christensen 08c49437f4 Add Int4 test 2017-02-24 13:44:09 -06:00
Jack Christensen 1672295222 Add int8 tests 2017-02-24 08:56:59 -06:00
Jack Christensen 83a5447cd2 wip 2017-02-22 18:08:05 -06:00
Jack Christensen 0ca0ee7206 wip 2017-02-20 18:56:52 -06:00
Jack Christensen d2c2baf4ea wip 2017-02-20 18:46:10 -06:00
Jack Christensen f78371da00 wip 2017-02-20 17:43:39 -06:00
Jack Christensen 3366699bea wip 2017-02-20 14:07:47 -06:00
Jack Christensen 66b79e9408 Extract pgio 2017-02-20 13:35:37 -06:00
Jack Christensen 8b07d97d13 wip 2017-02-20 13:20:00 -06:00
Jack Christensen 62f1adb342 wip 2017-02-20 12:08:46 -06:00
Jack Christensen a712d25469 wip 2017-02-20 09:30:52 -06:00
Jack Christensen 4faf97cc58 wip 2017-02-17 22:20:18 -06:00
Jack Christensen 366440d40d Remove *msgReader.readOID 2017-02-17 07:40:06 -06:00
Jack Christensen 47eda78ea1 Refactor huge switch statement 2017-02-16 19:44:50 -06:00
Jack Christensen 4d56221868 Do not scan binary values into strings
refs #219 and #228
2017-02-16 19:19:45 -06:00
Jack Christensen ccc65c361a Privatize Conn.SecretKey 2017-02-16 18:31:34 -06:00
Jack Christensen e390ac33f5 Fix Fatal -> Fatalf 2017-02-16 18:12:42 -06:00
Jack Christensen c540b65edf Fix leaked contexts 2017-02-16 18:11:30 -06:00
Jack Christensen efcc172c8b Remove unreachable code 2017-02-16 18:08:43 -06:00
Jack Christensen f947f0971f more v3 notes 2017-02-14 21:57:48 -06:00
Jack Christensen c8be89a16b v3 notes updated 2017-02-13 20:48:55 -06:00
Jack Christensen 11b82b3ca4 msgReader implemented in terms of ChunkReader
This should substantially reduce memory allocations and memory copies.

It also means that PostgreSQL messages are always entirely buffered in memory
before processing begins. This simplifies the message processing code.

In particular, Conn.WaitForNotification is dramatically simplified by this
change.
2017-02-13 20:45:42 -06:00
Jack Christensen 84802ece05 conn.Close closes underlying conn
Previously, it merely sent the termination message.
2017-02-13 20:40:04 -06:00
Jack Christensen f597c16a7b Add ChunkReader 2017-02-12 21:46:15 -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 d0a6921d12 Add dependency to travis.yml 2017-02-11 20:40:28 -06:00
Jack Christensen 048a75406f Fix context query cancellation
Previous commits had a race condition due to not waiting for the PostgreSQL
server to close the cancel query connection. This made it possible for the
cancel request to impact a subsequent query on the same connection. This
commit sets a flag that a cancel request was made and blocks until the
PostgreSQL server closes the cancel connection.
2017-02-11 19:53:18 -06:00
Jack Christensen deac6564ee Implement Query in terms of QueryContext
- Merge Rows.close into Rows.Close
- Merge Rows.abort into Rows.Fatal
2017-02-11 19:16:13 -06:00
Jack Christensen 6cdb58fc71 Exec implemented in terms of ExecContext 2017-02-11 18:49:39 -06:00
Jack Christensen 9c74626d22 Ping implemented in terms of PingContext 2017-02-11 18:44:39 -06:00
Jack Christensen 8cc480fc48 Fix grammar 2017-02-11 18:44:27 -06:00
Jack Christensen e4f9108e82 wip 2017-02-11 14:59:16 -06:00
Jack Christensen f0dfe4fe89 Merge alive and busy states into atomic status 2017-02-11 13:01:51 -06:00
Jack Christensen 09d37880ba wip 2017-02-09 21:42:58 -06:00
Jack Christensen 50b0bea9e5 msgReader pre-buffers messages when possible 2017-02-09 21:04:16 -06:00
Jack Christensen 855276e2cf Remove unused msgReader.Err() 2017-02-09 19:40:01 -06:00
Jack Christensen b8fdc38fa8 Only store Conn's *bufio.Reader in msgReader
Confusing and redundant to have the same *bufio.Reader in msgReader
and Conn.
2017-02-09 19:37:23 -06:00
Jack Christensen 72b6d32e2f Extracted more context handling 2017-02-07 21:49:58 -06:00
Jack Christensen 004c18e5a2 Begin extracting context handling 2017-02-07 20:35:37 -06:00
Jack Christensen 351eb8ba67 Initial proof-of-concept database/sql context support 2017-02-06 19:39:34 -06:00
Jack Christensen 14eedb4fca Add ConnPool context methods 2017-02-06 18:54:49 -06:00
Jack Christensen 37b86083e4 Fix race condition with canceled contexts 2017-02-04 18:44:55 -06:00
Jack Christensen 94eea5128e Add context dependency to travis 2017-02-04 18:09:25 -06:00
Jack Christensen a9e7e3acbc Extract connection dead on server test 2017-02-04 16:03:20 -06:00
Jack Christensen 24193ee322 Add QueryRowContext 2017-02-04 15:57:06 -06:00
Jack Christensen 3e13b333d9 Add QueryContext 2017-02-04 15:40:58 -06:00
Jack Christensen 78adfb13d7 Add Ping, PingContext, and ExecContext 2017-02-04 14:20:00 -06:00