Merge branch 'master' into savepoint-improvements

This commit is contained in:
John Gallagher
2016-05-19 13:49:02 -05:00
9 changed files with 421 additions and 55 deletions

View File

@@ -10,6 +10,10 @@
* BREAKING CHANGE: `Transaction::savepoint()` now returns a `Savepoint` instead of another
`Transaction`. Unlike `Transaction`, `Savepoint`s can be rolled back while keeping the current
savepoint active.
* Adds `Connection::prepare_cached`. `Connection` now keeps an internal cache of any statements
prepared via this method. The size of this cache defaults to 16 (`prepare_cached` will always
work but may re-prepare statements if more are prepared than the cache holds), and can be
controlled via `Connection::set_prepared_statement_cache_capacity`.
* Adds `insert` convenience method to `Statement` which returns the row ID of an inserted row.
* Adds `exists` convenience method returning whether a query finds one or more rows.
* Adds support for serializing types from the `serde_json` crate. Requires the `serde_json` feature.