Steven Fackler
01153f784a
Add a notifications iterator that waits with a timeout
...
Closes #105
2015-10-20 23:13:45 -07:00
Mathieu Rheaume
f5ee8686ae
To_String() cleanup for to_owned on method calls
2015-09-28 01:19:02 -04:00
Steven Fackler
8b80eba9ed
Add a name accessor to Type
...
Also fix up some misentered type info and add a test to ensure it's
correct.
2015-09-26 22:59:40 -07:00
Steven Fackler
f551a86c0f
Expose containing schema for custom types
2015-09-26 22:59:40 -07:00
Steven Fackler
a2609f6c90
Refactor notification API
2015-09-18 22:51:11 -07:00
Steven Fackler
008f14b459
Move notification stuff to its own module
2015-09-18 20:55:01 -07:00
Steven Fackler
03150f4cae
Overhaul the copy_out API
...
Returning a Reader ends up with a really weird user experience where you
have to make sure to drop it before making any other calls and it has to
internally fast forward to the end of the data even if the user drops it
early. Simply taking a Writer that all data is pushed into is
sigificantly more straightforward.
2015-09-15 23:11:14 -07:00
Steven Fackler
6e99874bd9
Add COPY TO STDOUT support.
...
Closes #51
2015-08-15 23:21:39 -07:00
Steven Fackler
dc2f04de96
Start work on COPY TO statements
2015-08-15 20:39:13 -07:00
Jonathan Reem
4b545ca466
Implement ToSql for &'a T where T: ToSql
...
This allows more flexible use of ToSql in generic contexts by allowing
references to be used for encoding.
2015-08-03 13:32:44 -07:00
Steven Fackler
64de6abb1e
Look up column names case insensitively
...
It tries a case sensitive comparison first so all existing uses should
continue to be OK. It should really have some form of unicode awarenes
but it's unclear exactly what. The JDBC driver uses the US locale when
lowercasing and libpq uses tolower with the system locale.
Closes #136
2015-07-30 22:04:22 -07:00
Steven Fackler
913678e9bf
Properly return ioerrors to the caller in copy_in
2015-06-12 00:39:12 -07:00
Steven Fackler
0883918f06
Allow direct indexing of Rows
.
2015-06-07 09:15:52 -07:00
Mark Lee
bbebf83749
Fix typos in tests' panic messages
2015-06-03 22:04:15 -07:00
Steven Fackler
f72bc4303a
Hide Type constructor
2015-05-26 21:47:42 -07:00
Steven Fackler
f800835456
Move error types to error module
2015-05-25 22:47:25 -07:00
Steven Fackler
417fb09b13
Un-reexport some type-related types
2015-05-25 22:09:00 -07:00
Steven Fackler
9b9b82a7db
Add copy_in to Statement
2015-05-25 20:40:57 -07:00
Steven Fackler
b5d9a38a59
Remove CopyInStatement
...
The API's awful to use.
2015-05-23 08:13:17 -07:00
Steven Fackler
35197960b2
Restructure errors
...
WasNull and BadResponse are gone, and Conversion was added. IoError
covers the BadResponse case and Conversion is a more general version of
WasNull.
2015-05-22 21:21:30 -07:00
Steven Fackler
ed26ff0042
Merge branch 'breaks'
2015-05-16 20:42:25 -07:00
Steven Fackler
0d63eeba50
Add optional chrono support
2015-05-13 22:25:43 -07:00
Steven Fackler
26e55ff2bc
Change negotiate_ssl back to taking &self
...
It's not clear that &mut is necessary and it makes connection calls a
bit nicer looking.
2015-05-13 15:17:37 -07:00
Steven Fackler
f957f10b19
Use a Box<NegotiateSsl> instead of a default param
...
Default parameter's aren't used in type inference yet, so the old setup
would result in overly verbose things like &mut SslMode::None::<NoSsl>.
In the future we can add the parameter back with a default of
Box<NegotiateSsl> to avoid forcing people to box stuff.
2015-05-13 15:14:37 -07:00
Steven Fackler
bf4820375d
Make openssl an optional dependency
2015-05-13 14:43:39 -07:00
Steven Fackler
be49982286
Make SSL infrastructure implementation agnostic
2015-05-13 14:42:22 -07:00
Steven Fackler
569ff870c2
Properly escape table and column names in prepare_copy_in
...
We have to assemble queries by hand here which is a bit sketchy.
Manually escaping the individual identifiers to avoid introducing
injection vulernabilities is unfortunate but necessary.
2015-05-05 21:57:06 -07:00
Steven Fackler
cd5537f803
Rename get_transaction_isolation to transaction_isolation
2015-04-24 22:10:57 -07:00
Steven Fackler
afb3bcf08b
Fix url breakage
2015-04-22 22:09:07 -07:00
Steven Fackler
8b43f0e3cf
Add methods to access the session transaction isolation level
...
Closes #115
2015-04-22 22:03:09 -07:00
Steven Fackler
411a8c495c
Fix percent-encoded usernames and passwords
...
Closes #113
2015-04-15 20:31:38 -07:00
Steven Fackler
62459f6944
Support serde's JSON type
2015-04-12 21:48:38 -07:00
Steven Fackler
a8d67a1fe4
Fix for upstream changes
2015-04-02 11:34:42 -07:00
Steven Fackler
7bcb8fb358
Fix most warnings
...
Blocked on rust-lang/rust#23734 on the last
2015-03-26 09:18:49 -07:00
Steven Fackler
f680c44d8f
Fix for upstream changes
2015-03-25 19:11:40 -07:00
Steven Fackler
1bf40efceb
Fix one last feature
2015-03-18 20:52:22 -07:00
Steven Fackler
3a0e10e5c7
Fix build issues
...
Also remove the impls for CIDR/INET. No ipv4/ipv6 agnostic type exists
anymore in the standard library, and the old one didn't cover netmasks
anyway.
2015-03-18 20:49:14 -07:00
Steven Fackler
26f26d1d9d
should_fail -> should_panic
2015-03-10 09:16:46 -07:00
Steven Fackler
dac4c4f4f1
Port to new IO
2015-02-27 20:03:25 -08:00
Steven Fackler
1767661618
Redesign ToSql and remove RawToSql
2015-02-24 21:39:29 -08:00
Steven Fackler
2380165c86
Rename NoticeHandler
2015-02-22 22:13:59 -08:00
Steven Fackler
28ea91f6e5
Turn Rows into an iterable instead of iterator
2015-02-22 22:13:59 -08:00
Steven Fackler
c30bfed857
Fill out remaining postgres types
2015-02-22 22:13:59 -08:00
Steven Fackler
b34e5f31de
Fix type checks
2015-02-22 22:13:59 -08:00
Steven Fackler
ef0e15b34d
Change element_type to kind
2015-02-22 22:13:59 -08:00
Steven Fackler
5ec039bd5d
Make time impls opt-in
2015-02-22 22:13:59 -08:00
Steven Fackler
b352b12c48
Make JSON support an optional feature
...
Even though we currently depend on rustc-serialize, this may not always
be the case. Forcing opt-in for all integration with external crates is
a safer course of action.
2015-02-22 22:13:59 -08:00
Steven Fackler
9ce2b77f26
Fix deprecation warnings
2015-02-20 20:17:47 -08:00
Steven Fackler
ca7554092d
Fix warnings
2015-02-19 09:17:48 -08:00
Steven Fackler
750065f111
Fix warning
...
Also disable debuginfo since it ICEs
2015-02-18 17:53:54 -08:00
Steven Fackler
3a9beb791d
Add Row::get_bytes
...
Useful for things like postgres_large_object to avoid some allocation
2015-02-15 23:24:09 -08:00
Steven Fackler
7db4cb70b8
Store parameters and add accessor
2015-02-15 20:22:56 -08:00
Steven Fackler
a0cca5fa77
Add a Slice adapter type
...
Until impl specialization exists, we can't define this implementaion
directly on &[T] because of the existing implementation for &[u8].
Closes #92
2015-02-12 22:52:55 -08:00
Steven Fackler
23c49c0219
Fix tests
2015-02-12 13:29:50 -08:00
Steven Fackler
9214a6886d
Use Postgres 9.4 on travis
2015-02-07 22:15:32 -08:00
Steven Fackler
cae12218ab
Encapsulate information about unknown types
2015-02-06 09:03:49 -08:00
Steven Fackler
f96664e63e
Rename ResultDescription to Column and encapsulate
2015-02-06 09:03:49 -08:00
Steven Fackler
7cfde75dce
Encapsulate DbError
2015-02-06 09:03:49 -08:00
Steven Fackler
173075bae1
Remove Error::WrongParamCount
2015-02-06 09:03:49 -08:00
Steven Fackler
cd1d9b9e3f
Remove deprecated methods
2015-02-06 09:03:49 -08:00
Steven Fackler
7101cab178
Remove WrongConnection and WrongTransaction Errors
...
These only occur during contract violations, so panicing is recommended
by the erorr handling RFC.
2015-02-06 09:03:48 -08:00
Steven Fackler
d35124e214
Make next_block_for return an option
2015-02-06 09:03:48 -08:00
Steven Fackler
b4aff18501
Remove unneeded feature
2015-02-04 19:29:59 -08:00
Steven Fackler
cb1ae4d115
Fix for stability changes
2015-01-29 08:59:43 -08:00
Steven Fackler
8d704f71ce
Fix for IO changes
2015-01-28 08:52:33 -08:00
Steven Fackler
af6084871f
Add an is_active method
...
Will be needed when Error::WrongTransaction is removed
2015-01-26 21:09:50 -08:00
Steven Fackler
99a3ba22a6
Fix tests
2015-01-23 11:10:04 -08:00
Steven Fackler
6381267267
Fix for upstream changes
2015-01-23 10:44:15 -08:00
Steven Fackler
5cce51723a
Move lazy_query to Statement
...
Symmetry is good
2015-01-22 22:52:29 -08:00
Steven Fackler
ee7f9ee806
Avoid accidentally closing finished statements
2015-01-22 22:33:35 -08:00
Steven Fackler
247e320275
Add explicit statement caching
...
Also remove transaction depth checks to preparation methods on
Connection since lifetimes of statements are tied to the connection, not
any transaction that may be active.
cc #84
2015-01-22 22:27:14 -08:00
Steven Fackler
b30bd46c2b
Set element_type for range types
...
Closes #95
2015-01-22 00:04:58 -08:00
Steven Fackler
1779d8c69d
Skip jsonb test on Travis
2015-01-21 22:39:47 -08:00
Steven Fackler
bca16fd4c5
Pass Type to raw traits and add jsonb support
2015-01-21 22:31:04 -08:00
Steven Fackler
290d572166
Redesign COPY IN execution setup.
...
The old Iterator of Iterators setup basically required all of the rows
to sit in memory at the same time, which defeats the entire purpose of
that configuration. There's probably a library that defines
`StreamIterator`, so this may jump to that.
2015-01-21 20:25:01 -08:00
Steven Fackler
9e9b0ee54a
Reenable test_unix_connection
2015-01-16 22:07:04 -08:00
Steven Fackler
92a3593d7f
Update for upstream changes
...
String vs Show still needs to be resolved, but it compiles now
2015-01-09 10:50:54 -08:00
Steven Fackler
347c79def9
Fix for upstream changes
2015-01-07 08:23:40 -08:00
Steven Fackler
94e70df6e2
Fix for upstream changes
2015-01-03 13:23:11 -08:00
Steven Fackler
1cee01762a
Remove Range support
...
It now lives in a separate project
2014-12-26 17:01:02 -05:00
Steven Fackler
d0868ed4fd
Pull array support out to a separate crate
...
It's pretty obscure and the API is kind of bad. Pulling it out should
allow it to evolve independently from the main library.
2014-12-24 23:58:27 -05:00
Steven Fackler
c5e7e46f0d
Fix deprecation warnings
2014-12-23 12:10:16 -05:00
Steven Fackler
01ea8afce8
Fix up tests
...
PostgreSQL v9.4 dropped SSLv3 support (yay)
2014-12-22 12:14:20 -05:00
Steven Fackler
d5c0cc0140
Fix for upstream changes
2014-12-19 10:43:42 -08:00
Steven Fackler
810a7442e0
Use out of tree serialize
2014-12-18 17:08:58 -08:00
Steven Fackler
cdfcef8e05
Update for upstream changes
2014-12-15 12:39:49 -08:00
Steven Fackler
02fdb06762
Support citext and oid types
...
This ended up involving some pretty major refactors and fixed a bug
where passing extension types as parameters to `execute` broke.
Closes #56
2014-12-14 16:46:22 -08:00
Steven Fackler
d349715061
Support CIDR as well
2014-12-14 12:27:02 -08:00
Steven Fackler
3ac26d4961
Add inet support
...
It's lossy ATM, since IpAddr doesn't store the netmask.
Closes #88
2014-12-14 11:39:26 -08:00
Steven Fackler
39ad5ff651
Fix for opt in Copy
2014-12-11 20:36:24 -08:00
Steven Fackler
42eb9fb01e
Move Send bound for NoticeHandler to trait def
...
This is a breaking change
2014-12-08 23:43:01 -08:00
Steven Fackler
39a89de5f0
Fix off by one in index impl
2014-12-06 10:41:49 -08:00
Steven Fackler
587aa653a3
Fix for equality changes
2014-12-05 07:58:11 -08:00
Steven Fackler
d5998d8f2a
Add Notifications::next_block_for method
...
The setup is a little hairy, but seems correct.
cc #19
2014-12-02 20:36:31 -08:00
Steven Fackler
75641e121f
Allow statements to be prepared on any object
...
Statements aren't cleaned up at the end of a transaction, so this is
safe.
2014-12-01 22:45:22 -08:00
Steven Fackler
6334f045cb
Be more conservative when closing things
2014-11-28 15:01:01 -08:00
Steven Fackler
dd9c712ea9
Fix for upstream changes
2014-11-28 12:24:34 -08:00
Steven Fackler
546967f68c
Add a blocking next method to Notifications
...
cc #19
2014-11-25 18:30:28 -08:00
Steven Fackler
a46c524200
Finish variant naming convention transition
2014-11-20 21:47:13 -08:00
Steven Fackler
b21300e344
Fix for nightly changes
2014-11-20 10:54:40 -08:00