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
793e5e9bbf
Bump rust-phf and fix makefile
...
config.stamp isn't a thing anymore
2014-03-27 19:46:25 -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
98c92c1dca
Update for sync changes
...
There's some scary transmuting here since PostgresConnection isn't Share
:(
2014-03-24 21:36:14 -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
537203d3cb
Bump rust-phf version
2014-03-19 20:22:17 -07:00
Steven Fackler
0aec726b69
De-~[] array
2014-03-18 23:07:12 -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
c5abe8c0d7
Add ToSql impls for Vec
2014-03-14 23:01:46 -07:00
Steven Fackler
5b646c0ca1
Some ~[] -> Vec work
2014-03-14 22:33:24 -07:00
Steven Fackler
850982c0b0
Fix for upstream changes
2014-03-14 20:19:57 -07:00
Steven Fackler
9af890e7a1
Stop using private variants
2014-03-14 13:26:19 -07:00
Steven Fackler
7111d8a28b
Fix for API update
2014-03-14 08:58:01 -07:00
Steven Fackler
b0751ae424
Add Range.union
2014-03-13 00:26:51 -07:00
Steven Fackler
dc65edf2d3
More ~str pattern removal
2014-03-12 23:50:10 -07:00
Steven Fackler
1a51593306
Remove ~str pattern
2014-03-12 23:34:57 -07:00
Steven Fackler
527d7376be
Remove #[inline] from a generic impl
2014-03-10 10:10:27 -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
a8cf28d428
Stop using deriving for types with phantom params
2014-03-08 21:41:31 -08:00
Steven Fackler
2064ba86ad
Update for Ord changes
2014-03-08 20:00:10 -08:00
Steven Fackler
5bfd0207e1
Update for upstream changes
2014-03-01 20:06:04 -08:00
Steven Fackler
42c6255412
Updates for upstream changes
2014-02-26 00:40:57 -08:00
Steven Fackler
fd9b104bd4
Remove an extra to_str
2014-02-24 21:34:07 -08:00
Steven Fackler
0d78856938
Update for ToStr removal
2014-02-24 21:08:40 -08:00
Steven Fackler
9b81b556a1
Update for hashmap move
2014-02-23 22:32:14 -08:00
Steven Fackler
6294db9500
Update for upstream changes
2014-02-22 23:02:26 -08:00
Steven Fackler
75de360e9f
Update for API changes
2014-02-21 23:18:39 -08:00
Steven Fackler
721288a024
Move docs onto macro
2014-02-20 09:19:08 -08:00
Steven Fackler
8bb601304b
Remove extra semicolon
2014-02-18 21:17:24 -08:00
Steven Fackler
20dc1046ee
Update Arc usage
2014-02-18 21:16:26 -08:00
Steven Fackler
a42b096902
Add some sanity asserts
2014-02-16 20:35:40 -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
adec4dd5ed
Make RawFromSql less sketchy
2014-02-15 13:44:48 -08:00
Steven Fackler
20c400afff
Update for IO API chagnes
2014-02-15 12:25:04 -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
f8a5bd3009
Update for closure changes
2014-02-11 19:37:39 -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
481a4e1c4b
Less reflection
2014-02-09 13:57:51 -08:00
Steven Fackler
b15716cf4e
Up debugging and add doc string
2014-02-08 11:25:24 -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
d567ca8c7a
Restructure directories for rustpkg
...
Turns out the src/postgres indirection isn't necessary.
2013-10-15 13:28:06 -07:00
Steven Fackler
d65d5bcbe2
Add notifications to transactions and pooled conns
2013-10-14 23:34:18 -07:00
Steven Fackler
fef8a35795
Implement asynchronous notification support
...
A decent first pass on #19 , but there really needs to be better support
for polling for notifications than making a query and calling next()
every once in a while.
2013-10-14 22:42:28 -07:00
Steven Fackler
e2ebe60de4
Doc grammar fix
2013-10-14 19:36:01 -07:00
Steven Fackler
ca4356fd4b
Change transaction API to RAII style
2013-10-13 18:58:31 -07:00
Steven Fackler
60a5dbf6a8
Some documentation cleanup
2013-10-12 23:19:57 -07:00
Steven Fackler
4299b1a5a2
Make find_col_named a default method
2013-10-12 23:12:53 -07:00
Steven Fackler
9253635fef
Move pool out of its own directory
...
It's not going to get complicated enough at the moment to require
submodules.
2013-10-12 15:18:50 -07:00
Steven Fackler
c93b299aca
Use temporary schema for PL/pgSQL function
2013-10-12 13:32:48 -07:00
Steven Fackler
4ef339f5b1
Update for PostgreSQL 9.3
...
Errors contain more information.
The notice handler test was rewritten to explicitly generate a notice.
2013-10-12 13:27:59 -07:00
Steven Fackler
53f342a53a
Fixes for Rust changes
2013-10-10 20:50:39 -07:00
Steven Fackler
e50bbd5d5c
Minor Travis config cleanup
2013-10-08 00:18:36 -07:00
Steven Fackler
039d02ed58
Fix tests on Travis
2013-10-08 00:00:58 -07:00
Steven Fackler
8a4cc66cbf
Testing fixes
2013-10-07 23:00:11 -07:00
Steven Fackler
dfd414a603
Fix for latest master
2013-10-07 21:59:21 -07:00
Steven Fackler
942214b55e
Hide message mod from docs
2013-10-05 12:38:33 -07:00
Steven Fackler
91f89976c8
Fix non default database usage
2013-10-04 20:26:52 -07:00
Steven Fackler
12c5ebc34b
Handle errors on initial connect
2013-10-04 19:26:57 -07:00
Steven Fackler
8a738365c7
Add doc root url attribute
2013-10-04 00:01:58 -07:00
Steven Fackler
70028c4267
Add some more documentation after lint fixes
2013-10-03 22:13:58 -07:00
Steven Fackler
5a4ef27311
Fix for new printf
2013-10-01 19:55:17 -07:00
Steven Fackler
b06769bd86
Remove newtype usage
...
Newtype structs can't hide their internals, so it seems best to not use
them.
2013-10-01 00:40:46 -07:00
Steven Fackler
df9a348980
Fixed up example
2013-10-01 00:01:54 -07:00
Steven Fackler
e2260ca15b
Minor cleanup
2013-09-30 08:35:03 -07:00
Steven Fackler
237ae8c16a
Move convenience methods to default methods
2013-09-29 23:44:45 -07:00
Steven Fackler
bba1f87721
Documentation fixes
2013-09-29 22:22:10 -07:00
Steven Fackler
f484d8dceb
Documentation updates
2013-09-29 22:03:11 -07:00
Steven Fackler
83c1349af9
Add back version to avoid warning
2013-09-29 20:00:27 -07:00
Steven Fackler
32f67c5abd
Switch things to newtypes
...
The bug I thought was blocking this wasn't actually.
2013-09-29 19:55:14 -07:00
Steven Fackler
83ad914774
Documentation for everything else
2013-09-29 19:47:30 -07:00
Steven Fackler
7729cdae58
Documentation for the postgres module
2013-09-29 19:12:20 -07:00
Steven Fackler
418d1bee28
Inline result indexing stuff
2013-09-29 10:53:44 -07:00
Steven Fackler
8fa7858b07
Make TransactionalPostgresStatement a newtype
2013-09-29 10:40:11 -07:00
Steven Fackler
25cd85e736
Minor cleanup
2013-09-28 23:02:51 -07:00
Steven Fackler
236ad87a8e
Make NaN test more comprehensive
2013-09-28 21:33:55 -07:00
Steven Fackler
380d03ffbe
Kill off Makefile
...
Due to mozilla/rust#9602 , the connection pool test had to be pulled into
the main test file.
2013-09-28 21:19:27 -07:00
Steven Fackler
324809f368
Rustpkg support!
...
Closes #12
2013-09-28 20:36:04 -07: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
67c6b3ffee
Visibility fix
2013-09-27 23:00:15 -07:00
Steven Fackler
19c834c2e7
Fixes for new master
2013-09-25 17:03:41 -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
498d2e7b26
Simplify connection pool
...
It's going to just be fixed size for now
2013-09-17 23:08:42 -07:00
Steven Fackler
fa472cf312
Restructure conn pool to RAII style
2013-09-17 22:06:47 -07:00
Steven Fackler
3c7c5dce51
More robust pool test
2013-09-16 23:38:27 -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
980fa9b474
Simplify result_format logic
2013-09-15 19:43:46 -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
ce034e3a70
Update to newest master
2013-09-07 15:45:11 -07:00
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
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
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