Commit Graph

83 Commits

Author SHA1 Message Date
Steven Fackler
584226bd23 Stop using to_strbuf 2014-05-24 20:42:07 -07:00
Steven Fackler
835da92987 Update for string changes 2014-05-23 20:08:14 -07:00
Steven Fackler
06db735101 Add tests for transaction checks 2014-05-18 19:46:21 -07:00
Steven Fackler
ec7dd96a30 Disallow use of wrong transactions
We don't want to allow statements to outlive the active transaction in
which they were prepared.
2014-05-18 19:34:01 -07:00
Steven Fackler
7849a5843d Death to ~str! 2014-05-15 19:59:01 -07:00
Steven Fackler
dcd47041d0 More ~str -> StrBuf 2014-05-15 19:27:19 -07:00
Steven Fackler
7f318f2865 Update for upstream changes 2014-05-13 19:27:26 -07:00
Steven Fackler
d1c412b393 More ~str -> StrBuf 2014-05-12 22:05:37 -07:00
Steven Fackler
d438521684 More Vec-ifying 2014-05-09 21:15:12 -07:00
Steven Fackler
6e0a860b9d Pull IO stuff out to a separate module. 2014-05-04 12:21:52 -07:00
Steven Fackler
ff587b3334 Use Box instead of ~ 2014-05-03 22:38:50 -07:00
James Sanders
de99157fc3 Add test for querying datname from pg_database
This is my use case for the "name" type.
2014-05-03 22:25:00 -06:00
James Sanders
b1e3e0e86e Add "name" type
This is the type of the datname column in pg_database, which I want so
that I can get a full list of databases. I'm mimicing the text types,
which seems to work, but I'm not sure if it's really the proper way to do it.
2014-05-02 17:38:06 -06:00
Steven Fackler
59e548623c De ~"" 2014-04-21 21:01:44 -07:00
Steven Fackler
5c866ba20b Unify Unix and TCP connection creation
Not all Unix socket setups can be configured via a URL connection string
since paths need not be UTF8, so it's possible to directly pass a
`PostgresConnectParams` type into `connect`.

In addition, an SSL encrypted connection can be used via Unix sockets.
2014-04-20 22:27:55 -07:00
Matthijs van der Vleuten
5e85d6b9bd test_unix_connection now detects the socket directory.
Change pg_hba.conf to allow connections through the socket.

Ignore connect_unix doc test. It requires `extern crate url;` which is not allowed with rustdoc.

Also, per comments on PR #35:
- Inline open_unix
- Centralize common code from connect and connect_unix in connect_finish.
2014-04-19 11:42:17 +02:00
Matthijs van der Vleuten
707e7ccfa4 Add support for connecting through Unix sockets
Includes connection test (assumes socket is in /tmp, the default location).
2014-04-18 23:41:39 +02:00
Steven Fackler
8516d841f1 Tweak connection pool API 2014-04-11 19:45:06 -07:00
Steven Fackler
0d70c17151 Update for IO Vec changes 2014-04-07 20:02:05 -07:00
Steven Fackler
a9ec7256a7 More cleanup 2014-03-30 19:21:51 -07:00
Steven Fackler
b930bc36f9 Remove yet more failure 2014-03-29 19:01:23 -07:00
Steven Fackler
9ff7b3d00a Remove mandatory failure from row lookup 2014-03-29 17:01:41 -07:00
Steven Fackler
4adf743aeb Update for upstream changes 2014-03-29 14:33:11 -07:00
Steven Fackler
61f9f43cf3 Stop failing on wrong types 2014-03-27 22:43:10 -07:00
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
793e5e9bbf Bump rust-phf and fix makefile
config.stamp isn't a thing anymore
2014-03-27 19:46:25 -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
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
7111d8a28b Fix for API update 2014-03-14 08:58:01 -07: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
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
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
d84acfda52 Rename tests module to test 2014-02-09 16:01:09 -08:00
Steven Fackler
88bb03119a Restructure to support rustpkg 2013-09-28 20:30:35 -07:00
Steven Fackler
19c834c2e7 Fixes for new master 2013-09-25 17:03:41 -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
5654fa5f2a Fail on incorrect parameter count 2013-09-11 22:33:19 -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
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
a17fe648de Rename PostgresResult methods to be more clear 2013-09-05 20:31:23 -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