Steven Fackler
76ff679f9a
Don't fail on wrong param count
2014-03-27 21:39:03 -07:00
Steven Fackler
0916a53df3
Make lazy_query result return a Result
2014-03-27 21:20:04 -07:00
Steven Fackler
78c96f23a4
Remove failing wrappers
...
Embrace the error propogation!
2014-03-27 21:08:22 -07:00
Steven Fackler
2d59e5911a
Fix PostgresLazyResult docs
2014-03-25 21:50:59 -07:00
Steven Fackler
587cbff836
Restructure lazy query API
...
It doesn't make any sense to limit lazy queries to statments *prepared*
inside a transaction. We really only care that we're in a transaction
when the statement is executed. This does introduce a new runtime error
if a statement prepared on connection A is executed on a transaction
prepared on connection B, but I don't think anyone will *ever* run into
that.
2014-03-25 21:07:42 -07:00
Steven Fackler
a773f19c20
Some cleanup
2014-03-23 17:34:50 -07:00
Steven Fackler
613ceec630
Updates for upstream changes
2014-03-22 21:20:22 -07:00
Steven Fackler
ec82c45cc9
Updates for API changes
2014-03-20 19:14:20 -07:00
Steven Fackler
2a822eb8c0
Use autoderef stuff for RefCell
2014-03-18 21:00:06 -07:00
Steven Fackler
01e77a06f2
Link in logging crate
2014-03-17 21:05:04 -07:00
Steven Fackler
15eb3891c5
Down with libextra!
2014-03-15 21:35:44 -07:00
Steven Fackler
5b646c0ca1
Some ~[] -> Vec work
2014-03-14 22:33:24 -07:00
Steven Fackler
3cf70fa533
Use no_run for doc tests
2014-03-10 10:06:40 -07:00
Steven Fackler
8034413247
De-globbing
2014-03-09 22:01:51 -07:00
Steven Fackler
58571cab26
Add examples!
2014-03-09 15:22:20 -07:00
Steven Fackler
3760a98528
Check doc code blocks
2014-03-08 22:01:24 -08:00
Steven Fackler
42c6255412
Updates for upstream changes
2014-02-26 00:40:57 -08:00
Steven Fackler
9b81b556a1
Update for hashmap move
2014-02-23 22:32:14 -08:00
Steven Fackler
75de360e9f
Update for API changes
2014-02-21 23:18:39 -08:00
Steven Fackler
c78266b06d
Lower visibility on thing
2014-02-15 19:16:12 -08:00
Steven Fackler
8831466caa
Split statement and result logic out of lib.rs
2014-02-15 18:59:16 -08:00
Steven Fackler
e22a310aad
Switch to extern crate syntax
2014-02-15 15:03:35 -08:00
Steven Fackler
7c9f552eb4
Update for hex move
2014-02-13 19:26:52 -08:00
Steven Fackler
0f4e4e9c08
Sort use statements
2014-02-11 23:44:07 -08:00
Steven Fackler
d72c607b6d
Don't desync the stream on error in quick_query
2014-02-11 23:09:27 -08:00
Steven Fackler
8ae9636422
Forward errors from statement and portal cleanup
2014-02-11 23:07:34 -08:00
Steven Fackler
835f745be2
Updates for library changes
2014-02-10 19:20:53 -08:00
Steven Fackler
dfb61df672
Don't fail on drop with a desynched stream
2014-02-10 00:20:39 -08:00
Steven Fackler
6e37db330b
Properly handle object cleanup errors
...
Destructors now fail and there's a finish method returning an error.
2014-02-09 23:55:16 -08:00
Steven Fackler
dec566e683
Track stream desynchronization
...
If we hit an IO error talking to the server, message framing has
probably been lost and we shouldn't try to keep talking.
2014-02-09 22:45:26 -08:00
Steven Fackler
d84acfda52
Rename tests module to test
2014-02-09 16:01:09 -08:00
Steven Fackler
0ea80b4c99
Build dynamic and static libs
2014-02-09 15:55:31 -08:00
Steven Fackler
e0ec05c9de
Update for collections split
2014-02-08 10:24:21 -08:00
Steven Fackler
26a0cdaae7
Use a Cell for next_portal_id
2014-02-07 18:17:40 -08:00
Steven Fackler
774533e1df
Add a size_hint to result iterator
2014-02-07 18:07:25 -08:00
Steven Fackler
c413633fa9
More error checking
2014-02-06 22:59:43 -08:00
Steven Fackler
e7a2ee8bd8
More updates for upstream changes
2014-02-06 21:37:05 -08:00
Steven Fackler
fdd1f4f88d
Beginnings of fixes for IO API changes
...
It is still very much incorrect in the face of errors, but it's better
2014-02-06 20:58:47 -08:00
Steven Fackler
dbb698b9f3
Rename notification iterator
2014-02-03 00:09:48 -05:00
Steven Fackler
d6aa529474
Move source files to src directory
...
The root was getting too crowded.
2014-02-02 23:28:59 -05:00
Steven Fackler
88bb03119a
Restructure to support rustpkg
2013-09-28 20:30:35 -07:00
Steven Fackler
81af9e9e98
Import Port
2013-09-28 11:14:06 -07:00
Steven Fackler
ce0031c5d0
Restructure Cell wrapping for PostgresConnection
...
It's silly to wrap each individual field in Cell when we can just wrap
everything together.
2013-09-19 21:06:45 -07:00
Steven Fackler
bad3a5e36c
Stop storing query string in statement
...
The query string isn't as useful here since any error at this stage
won't be a syntax issue.
2013-09-18 20:54:47 -07:00
Steven Fackler
fa472cf312
Restructure conn pool to RAII style
2013-09-17 22:06:47 -07:00
Steven Fackler
65aabf5147
Sketches of a connection pool
2013-09-16 23:03:13 -07:00
Steven Fackler
2f282affe6
Move transaction cleanup to descructor
...
Support for connection pooling, since we'll recover the conn after a
task failure.
2013-09-15 22:35:30 -07:00
Steven Fackler
3a7f9ac50c
Updated README with error code stuff
2013-09-15 19:26:56 -07:00
Steven Fackler
1858ed41dc
Better error output
2013-09-14 22:56:52 -07:00
Steven Fackler
a00843751e
Parse Notice/Error SQLSTATE codes
...
The enum is stuck inside of an extra module due to mozilla/rust#4375 .
2013-09-14 21:37:20 -07:00
Steven Fackler
f392d6caf1
Use buffered IO
...
Closes #17
2013-09-14 13:08:09 -07:00
Steven Fackler
5654fa5f2a
Fail on incorrect parameter count
2013-09-11 22:33:19 -07:00
Steven Fackler
4ec8130860
Don't fail on unsupported auth methods
2013-09-11 22:02:32 -07:00
Steven Fackler
970b5f657a
Allow custom notice handling
...
It was a tossup between a ~fn and a ~Trait *shrug*
2013-09-11 19:57:26 -07:00
Steven Fackler
db634b5a3c
Get rid of use *
2013-09-08 22:40:08 -07:00
Steven Fackler
9562711af3
TIMESTAMP WITH TIMEZONE support
2013-09-08 21:33:41 -07:00
Steven Fackler
5bb1ec2db7
Remove read_message macros
...
Workaround for mozilla/rust#9049 but probably the right thing to do in
any case.
2013-09-08 20:35:24 -07:00
Steven Fackler
7971e8678d
DNS lookup
2013-09-08 14:26:34 -07:00
Steven Fackler
20b7b5426d
Timestamp support
...
cc #6
2013-09-08 13:27:43 -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
749aa735f6
Make nice types for parameter and result descs
2013-09-04 21:26:43 -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
9891f597bc
Switch over to new format + clean up matches
2013-09-03 20:07:10 -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
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
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
Steven Fackler
27bbf6f7fd
Pull ToSql and FromSql out into their own module
...
Their implementations will become significantly more complicated once we
start handling binary data.
2013-08-28 00:37:06 -04:00
Steven Fackler
604b1ddb4d
Fix for generic type syntax changes
2013-08-28 00:09:50 -04:00
Steven Fackler
afd7d8800d
Better transaction syntax
...
Closes #9
2013-08-27 01:40:23 -04:00
Steven Fackler
6afc2cac3f
Fix error handling for prepare, result and query
...
Closes #2
2013-08-27 01:06:53 -04:00
Steven Fackler
594830b296
Closer-to-proper error handling for connect
2013-08-27 00:19:24 -04:00
Steven Fackler
c73e1e93f4
ifmt! -> format!
2013-08-26 22:38:02 -04:00
Steven Fackler
f60d3993b3
Handle conditions in Drop impls
...
Aborting the process is sadface
2013-08-26 03:36:09 -04:00
Steven Fackler
47ef8ea6b1
Add plaintext and MD5 password authentication
2013-08-26 01:08:37 -04:00
Steven Fackler
ceaac705d6
Parameter binding support!
2013-08-24 23:47:36 -04:00
Steven Fackler
9ff747724a
Query support!
2013-08-23 03:13:42 -04:00
Steven Fackler
dd64882d32
Updates and transactions
2013-08-23 01:24:14 -04:00
Steven Fackler
e5c5b783f3
Clean up for extra::url fixes
2013-08-22 22:47:06 -04:00
Steven Fackler
2b617e61b1
Beginnings of Bind support
2013-08-22 03:12:35 -04:00
Steven Fackler
1f127289bb
Fully construct prepared statements
2013-08-22 02:41:26 -04:00
Steven Fackler
11098f4d47
Beginnigs of native Postgres frontend
2013-08-22 01:58:37 -04:00
Steven Fackler
067f2c9f91
Removed sql and sqlite3
...
I'm going to focus on a postgres driver for now
2013-08-18 17:14:22 -04:00