Commit Graph

834 Commits

Author SHA1 Message Date
Steven Fackler
21ce229fe1 Update to work with latest master
This is segfaulting for me in places that should not segfault. Not sure
what's going on.
2013-09-07 11:28:26 -07:00
Steven Fackler
1b00801938 Handle asynchronous ParameterStatus
Closes #16
2013-09-06 21:56:31 -07:00
Steven Fackler
4eb99e096e Explicitly set client encoding
Postgres will translate data from non-utf8 databases for us
2013-09-05 20:49:19 -07:00
Steven Fackler
a17fe648de Rename PostgresResult methods to be more clear 2013-09-05 20:31:23 -07:00
Steven Fackler
0a361967ce Avoid infinite loop 2013-09-04 23:48:02 -07:00
Steven Fackler
8422072d37 Remove savepoint IDs entirely
Turns out that Postgres allows nested savepoints with the same name
2013-09-04 23:40:22 -07:00
Steven Fackler
6a696461b9 Simplify savepoint ID logic
A savepoint ID is now the "depth" of the savepoint.
2013-09-04 23:32:33 -07:00
Steven Fackler
cf5bd66218 Add nested transaction support 2013-09-04 23:28:44 -07:00
Steven Fackler
c81c207c90 Add methods to look at params and results 2013-09-04 21:51:48 -07:00
Steven Fackler
f8ce356a7a Types cleanup 2013-09-04 21:30:20 -07:00
Steven Fackler
749aa735f6 Make nice types for parameter and result descs 2013-09-04 21:26:43 -07:00
Steven Fackler
06a9a7c399 Document lazy queries 2013-09-03 22:55:01 -07:00
Steven Fackler
c0d70e90dc Implement transactional lazy queries
Closes #13
2013-09-03 22:42:24 -07:00
Steven Fackler
47d1458eb7 More infrastructure for lazy queries
cc #13
2013-09-03 22:20:21 -07:00
Steven Fackler
c2b3768a29 Infrastructure for lazy queries in transactions
cc #13
2013-09-03 22:05:28 -07:00
Steven Fackler
91d7c856ee Clean up tests
Removed most of the usage of transactions in the tests, replacing with
temporary tables or SELECT literal queries.
2013-09-03 20:50:02 -07:00
Steven Fackler
9891f597bc Switch over to new format + clean up matches 2013-09-03 20:07:10 -07:00
Steven Fackler
7990809251 Switch MemReader to BufReader 2013-09-03 19:35:28 -07:00
Steven Fackler
f404527b3a Add non-transactional test
Queries were completely broken outside of transactions for a while
without me realizing.
2013-09-03 00:00:43 -07:00
Steven Fackler
955d4cfe0f Grammar fix 2013-09-02 23:27:55 -07:00
Steven Fackler
729debea5e Syntax highlighting fix 2013-09-02 23:23:58 -07:00
Steven Fackler
55c0674658 Fill out README 2013-09-02 23:19:03 -07:00
Steven Fackler
a677f62fe2 Remove lazy query support
It turns out this only works inside a transaction, so the API will need
to be rethought. Probably PostgresTransaction.prepare will return a
special TransactionalPreparedStatement that has support for it or
something.
2013-09-02 23:09:30 -07:00
Steven Fackler
03e0ab29e2 Add link attribute 2013-09-02 19:08:56 -07:00
Steven Fackler
3d8d35d840 Overload Index for PostgresRow
RowIndex has to be implemented for int unfortunately since that's what a
literal ends up resolving to.
2013-09-02 18:53:03 -07:00
Steven Fackler
8ab3c1d04b Add column name to index lookup 2013-09-02 20:07:08 -04:00
Steven Fackler
57146672ab Support for "char" type 2013-09-02 18:14:22 -04:00
Steven Fackler
dd6f8eb6b4 Support for CHAR(n) 2013-09-02 17:52:23 -04:00
Steven Fackler
64195b819e Cleanup types.rs 2013-09-02 17:06:22 -04:00
Steven Fackler
aa37fe31d4 Json and Uuid support
cc #6
2013-09-02 16:54:16 -04:00
Steven Fackler
2cc7f0ff84 Support for TEXT type 2013-09-02 16:07:57 -04:00
Steven Fackler
46b4228415 Binary return value support
The set of types the driver asks for in binary format is currently hard
coded.

cc #7, #14
2013-09-02 15:43:48 -04:00
Steven Fackler
1a6d681cbd Strict type checking in ToSql
cc #14
2013-09-02 13:27:25 -04:00
Steven Fackler
043d231476 Remove redundant format specifiers 2013-09-02 01:29:13 -04:00
Steven Fackler
e9245294f0 Store row description in statement
Will be useful for FromSql binary formats. CC #7
2013-09-01 14:09:08 -07:00
Steven Fackler
8b787cf8af Convenience update methods
cc #11
2013-09-01 11:06:33 -07:00
Steven Fackler
e93df44149 Switch PostgresResult storage to Deque 2013-09-01 00:18:09 -07:00
Steven Fackler
fa818566f3 Support for lazy query results
Closes #13.
2013-08-31 23:19:44 -07:00
Steven Fackler
6071706e7e More work towards row limits
cc #13
2013-08-31 22:48:49 -07:00
Steven Fackler
e82c887949 Restructure result API for row limits
Work towards #13.
2013-08-31 21:55:44 -07:00
Steven Fackler
0f1d31c4ab Batch command sequence writes
This allows command sequences like Prepare/Describe/Sync to be sent in
fewer TCP packets.
2013-08-31 17:17:15 -07:00
Steven Fackler
557c61d6db Binary transmission of numeric types
It looks like Postgres doesn't guarantee that its floats are IEEE754,
but I don't know if there are any reasonable platforms on which the
format is actually different.

Work towards #7.
2013-08-31 17:17:06 -07:00
Steven Fackler
f56c519097 Boolean parameters transmitted as binary
Work towards #7.
2013-08-31 17:16:59 -07:00
Steven Fackler
ace9ffcec4 Infrastructure for binary parameter formats
Work towards #7.
2013-08-31 17:16:49 -07:00
Steven Fackler
543af184ab Moving blocks around for consistency 2013-08-29 02:19:53 -04:00
Steven Fackler
440421e81a Minor cleanup 2013-08-29 01:44:34 -04:00
Steven Fackler
be080e783f Stop storing num_params in statement
Postgres will check the count for us.
2013-08-29 01:33:27 -04:00
Steven Fackler
30d1a43f4b Parsing of ErrorResponse and NoticeResponse
PostgresDbError::new plays a little fast and loose with the expected
format. Hopefully that's okay.

Closes #4
2013-08-29 00:24:43 -04:00
Steven Fackler
b93bbd7eed Switched Message enums to struct-like
They're now a lot more clear, especially ones like Bind that have tons
of fields.
2013-08-28 23:25:15 -04:00
Steven Fackler
0204d950c4 Log NoticeResponses
Progress towards #3. I think we probably want to have a user
configurable notice handler.
2013-08-28 02:23:36 -04:00