Commit Graph

338 Commits

Author SHA1 Message Date
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
348195b718 Optimize execute
Avoiding the statment close by using the unnamed statment improves the
lower bound perf by ~1/3:

test bench_execute        ... bench:    425429 ns/iter (+/- 24970)
test bench_naiive_execute ... bench:    607967 ns/iter (+/- 53434)

cc #83
2014-12-01 22:24:31 -08:00
Steven Fackler
80b7fa823c Clean up copy preparation a bit 2014-12-01 21:28:58 -08:00
Steven Fackler
1908821e57 Clean up bad response logic a bit 2014-11-28 17:35:37 -08:00
Steven Fackler
e7f66f89ac Use rust-openssl's MaybeSslStream 2014-11-28 15:54:37 -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
7b8786c6a2 Upgrade to openssl 0.2 2014-11-27 21:39:16 -08:00
Steven Fackler
7ba9db9b6f Check for statement close errors in execute 2014-11-27 11:16:14 -08:00
Steven Fackler
4d3e102f7e Add result_descriptions to Rows and Row
This can be useful for functions that are just passed a `Rows` or `Row`
and want to introspect a bit into the columns.
2014-11-26 10:50:31 -08:00
Steven Fackler
e8f12a4a1e Add a desync check in next_block 2014-11-25 19:17:53 -08:00
Steven Fackler
546967f68c Add a blocking next method to Notifications
cc #19
2014-11-25 18:30:28 -08:00
Steven Fackler
d84fa98b4b Variant cleanup 2014-11-25 12:59:31 -08:00
Steven Fackler
1882d878ad Remove unneccesary None qualification 2014-11-20 21:48:05 -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
Steven Fackler
1fa5941562 Use Vec instead of MemWriter 2014-11-19 20:54:32 -08:00
Kevin Butler
465bb9e006 docs: [T,.. N] no longer coerces to &[T] 2014-11-19 19:36:47 +00:00
Kevin Butler
85bde64ede slice_shift_char signature change 2014-11-19 18:11:23 +00:00
Kevin Butler
0b8dc31c2f [T,.. N] no longer coerces to &[T] 2014-11-19 17:58:30 +00:00
Steven Fackler
9a87c6e18a Make time support optional 2014-11-17 19:11:32 -08:00
Steven Fackler
22f4be2b8c Remove struct_variant feature gate 2014-11-17 18:20:48 -08:00
Steven Fackler
e5c2edaf97 More enum namespacing preparation 2014-11-17 13:46:33 -08:00
Steven Fackler
6ba926d016 Fix build errors 2014-11-17 08:56:25 -08:00
Steven Fackler
89f9960fe7 Use FromError 2014-11-16 22:54:57 -08:00
Steven Fackler
9ae7b13f51 Fix deprecation warnings 2014-11-07 08:54:10 -08:00
Steven Fackler
a4fe4e2056 Flatten and rename error stuff 2014-11-03 22:24:11 -08:00
Steven Fackler
056f90a3a2 Glob import message variants 2014-11-03 21:47:53 -08:00
Steven Fackler
a442b2ed4c Unmangle ConnectTarget and MaybeSslStream 2014-11-03 21:41:35 -08:00
Steven Fackler
ad82d28d18 Demangle PostgresType 2014-11-03 21:31:08 -08:00
Steven Fackler
167b9d0209 Misc cleanup 2014-11-02 16:48:38 -08:00
Steven Fackler
761007487a Grab RingBuf from std 2014-11-02 10:40:03 -08:00
Steven Fackler
bd9b77a4cf Fix compilation errors 2014-11-02 10:38:45 -08:00
Steven Fackler
4fbd92e6de A bit of formating cleanup 2014-11-01 16:38:52 -07:00
Steven Fackler
f8339a6e18 PostgresLazyRows -> LazyRows 2014-11-01 16:28:38 -07:00
Steven Fackler
34aaeaab71 PostgresRow -> Row 2014-11-01 16:27:30 -07:00
Steven Fackler
4eda9cec95 PostgresCopyInStatement -> CopyInStatement 2014-11-01 16:26:03 -07:00
Steven Fackler
7248912cf9 PostgresTransaction -> Transaction 2014-11-01 16:25:11 -07:00
Steven Fackler
4b66c4ab68 PostgresStatement -> Statement 2014-11-01 16:24:24 -07:00
Steven Fackler
2da41be987 Remove the old connection pool
It's been deprecated for a long time
2014-11-01 16:22:41 -07:00
Steven Fackler
c11cbd6b7d PostgresConnection -> Connection 2014-11-01 16:21:47 -07:00
Steven Fackler
d88666586a PostgresCancelData -> CancelData 2014-11-01 16:19:02 -07:00
Steven Fackler
570512725f PostgresNotification -> Notification 2014-11-01 16:18:09 -07:00
Steven Fackler
c6c7d8f574 PostgresNoticeHandler -> NoticeHandler 2014-11-01 16:16:50 -07:00
Steven Fackler
975b6dc350 PostgresConnectParams -> ConnectParams 2014-11-01 16:15:30 -07:00
Steven Fackler
09cb2fd4fe PostgresUserInfo -> UserInfo 2014-11-01 16:14:08 -07:00
Steven Fackler
873a006508 PostgresConnectTarget -> ConnectTarget 2014-11-01 16:13:01 -07:00
Steven Fackler
cea15783a5 PostgresResult -> Result 2014-11-01 16:12:05 -07:00
Steven Fackler
b939526d7b static -> const 2014-11-01 16:02:50 -07:00
Steven Fackler
22efd1da4b Update for removal of collections traits 2014-11-01 15:50:25 -07:00
Steven Fackler
a151a5ba02 Update for rust changes 2014-10-31 08:51:27 -07:00
Steve Klabnik
675534c26f fail -> panic 2014-10-30 00:26:03 -04:00
Steven Fackler
4a9ca42b20 Reuse the same vec during copies 2014-10-28 09:16:11 -07:00
Steven Fackler
5dd09ce9c4 Update docs location 2014-10-26 13:11:14 -07:00
Steven Fackler
886f24ea9d Get rid of literal type specifiers
Yay trait reform!
2014-10-25 23:43:59 -07:00
Steven Fackler
7929d07f74 Fix a desynchronization issue 2014-10-25 20:26:45 -07:00
Steven Fackler
a480ec1cfb Some more if let conversion 2014-10-25 17:58:46 -07:00
Steven Fackler
00164fad31 Fix read_message name
The issue that forced the rename has been resolved
2014-10-23 23:31:26 -07:00
Steven Fackler
86bf3b719b Switch some .to_string to .into_string 2014-10-18 11:17:12 -07:00
Steven Fackler
e73557cce0 Pull liburl in-crate
Cargo apparently can't deal with liburl and rust-url at the same time
and rust-url has some bugs that prevent using it for now.
2014-10-15 08:37:43 -07:00
Steven Fackler
774fd93d80 Start using if let 2014-10-13 21:12:25 -07:00
Steven Fackler
f62aa26917 Fix for upstream changes 2014-10-09 20:43:14 -07:00
Steven Fackler
557a159a8a Add a trait abstracting over transactions and connections
This is implemented *in addition* to the intrinsic methods because
having to import a trait to call `prepare` sucks.

Closes #63
2014-10-08 20:29:26 -07:00
Steven Fackler
b581e3a0af Doc rephrase 2014-10-05 20:49:09 -07:00
Steven Fackler
749dc34529 Clean up example a bit 2014-10-05 20:47:48 -07:00
Steven Fackler
b69ae99a51 Handle COPY IN in batch_execute 2014-10-05 17:31:25 -07:00
Steven Fackler
58dd5fe12b Remove weird continue 2014-10-05 14:47:57 -07:00
Steven Fackler
e5ed2ba96e Use new slice syntax 2014-10-04 20:08:44 -07:00
Steven Fackler
dd4052210f Improve error handling in COPY 2014-10-01 14:40:43 -07:00
Steven Fackler
51ace9081a Don't fuse row iterator 2014-09-30 23:54:11 -07:00
Steven Fackler
a64ca5f955 Remove failure from PostgresDbError::new
Closes #43
2014-09-30 22:52:27 -07:00
Steven Fackler
5561e7baca Add column_types to copy in statement 2014-09-30 00:15:17 -07:00
Steven Fackler
0c3f3b1e83 More docs + return copy count from execute 2014-09-30 00:11:23 -07:00
Steven Fackler
91a90f0d1c Remove some unused methods 2014-09-30 00:02:54 -07:00
Steven Fackler
a85d50805d Add some prepare_copy_in docs 2014-09-30 00:01:15 -07:00
Steven Fackler
4863433ca7 Add prepare_copy_in to transaction 2014-09-29 23:49:58 -07:00
Steven Fackler
011d531b1d Remove Binary/Text choice from ToSql
Text format doesn't work with our COPY implementation, and FromSql is
already binary only.
2014-09-29 23:41:13 -07:00
Steven Fackler
249db6b55a Correctly handle bad column counts in copy 2014-09-29 23:32:57 -07:00
Steven Fackler
f88f908498 Don't flush more than needed when copying 2014-09-29 23:09:39 -07:00
Steven Fackler
2e61f1316f Initial COPY FROM support!
cc #51
2014-09-29 22:56:43 -07:00
Steven Fackler
a4a625a30c Detect direct queries to COPY FROM 2014-09-29 21:05:42 -07:00
Mike "Wizard" Dilger
ed3bcda729 Fix double borrow of conn RefCell<T> 2014-09-30 13:46:21 +13:00
Steven Fackler
18e1240601 Work around rust-lang/rust#17594 2014-09-27 13:55:47 -07:00
Steven Fackler
5410363f49 Fix deprecations 2014-09-24 00:18:27 -07:00
Steven Fackler
c8cc3799be Fix deprecation warnings 2014-09-17 22:57:23 -07:00
Steven Fackler
0c1dccfd52 Remove unneeded crate_name attribute 2014-09-14 19:27:15 -07:00
Steven Fackler
d9b7d3c4d2 Remove some failure
Avoid reborrowing a RefCell over and over since it'll bloat at least the
IR and maybe the resulting binary with failure cruft.
2014-09-12 22:07:10 -07:00
Steven Fackler
e362feb85b Suppress warnings 2014-09-11 21:35:10 -07:00
Steven Fackler
9a7e5b7c7d Misc cleanup 2014-09-06 16:33:43 -07:00
Steven Fackler
fa34efba8f Change docs to work around coercion issue 2014-08-30 10:57:46 +01:00
Steven Fackler
364c213383 Add back crate_name for rustdoc 2014-08-23 09:17:58 -07:00
Steven Fackler
9d44bb8c7e Fix doc typo 2014-08-20 22:40:11 -07:00
Steven Fackler
b8539003c3 Improve examples a bit 2014-08-19 21:49:27 -07:00
Steven Fackler
30a3210be0 Revert "Strip prefixes from types"
This reverts commit ccdb02f661.

I'm not sure this is the right way to go just yet
2014-08-18 22:02:16 -07:00
Steven Fackler
ccdb02f661 Strip prefixes from types
They can be prefixed with the crate name
2014-08-18 21:52:56 -07:00
Steven Fackler
44da9d9e1e Start using where clauses 2014-08-17 13:57:58 -07:00
Steven Fackler
d9e4625f01 Switch stuff to unsigned types 2014-08-15 20:14:46 -07:00
Steven Fackler
f7c0038fa3 Formatting cleanup 2014-08-15 19:50:11 -07:00
Steven Fackler
dec56db1d6 Remove old crate attributes 2014-08-15 19:25:12 -07:00
Steven Fackler
455dea3bd0 Force all result formats to binary 2014-08-14 20:22:12 -07:00