@@ -300,7 +300,7 @@ pub struct PostgresNotifications<'conn> {
300
300
impl < ' conn > Iterator < PostgresNotification > for PostgresNotifications < ' conn > {
301
301
/// Returns the oldest pending notification or `None` if there are none.
302
302
///
303
- /// # Note
303
+ /// ## Note
304
304
///
305
305
/// `next` may return `Some` notification after returning `None` if a new
306
306
/// notification was received.
@@ -330,7 +330,7 @@ pub struct PostgresCancelData {
330
330
/// Only the host and port of the connetion info are used. See
331
331
/// `PostgresConnection::connect` for details of the `params` argument.
332
332
///
333
- /// # Example
333
+ /// ## Example
334
334
///
335
335
/// ```rust,no_run
336
336
/// # use postgres::{PostgresConnection, NoSsl};
@@ -694,7 +694,7 @@ impl PostgresConnection {
694
694
/// should be created manually and passed in. Note that Postgres does not
695
695
/// support SSL over Unix sockets.
696
696
///
697
- /// # Examples
697
+ /// ## Examples
698
698
///
699
699
/// ```rust,no_run
700
700
/// # use postgres::{PostgresConnection, NoSsl};
@@ -759,7 +759,7 @@ impl PostgresConnection {
759
759
/// The statement is associated with the connection that created it and may
760
760
/// not outlive that connection.
761
761
///
762
- /// # Example
762
+ /// ## Example
763
763
///
764
764
/// ```rust,no_run
765
765
/// # use postgres::{PostgresConnection, NoSsl};
@@ -784,11 +784,11 @@ impl PostgresConnection {
784
784
/// the connection for the duration of the transaction. The transaction
785
785
/// is active until the `PostgresTransaction` object falls out of scope.
786
786
///
787
- /// # Note
787
+ /// ## Note
788
788
/// A transaction will roll back by default. Use the `set_commit` method to
789
789
/// set the transaction to commit.
790
790
///
791
- /// # Example
791
+ /// ## Example
792
792
///
793
793
/// ```rust,no_run
794
794
/// # use postgres::{PostgresConnection, NoSsl};
@@ -837,14 +837,14 @@ impl PostgresConnection {
837
837
/// execution of batches of non-dynamic statements - for example, creation
838
838
/// of a schema for a fresh database.
839
839
///
840
- /// # Warning
840
+ /// ## Warning
841
841
///
842
842
/// Prepared statements should be used for any SQL statement which contains
843
843
/// user-specified data, as it provides functionality to safely embed that
844
844
/// data in the statment. Do not form statements via string concatenation
845
845
/// and feed them into this method.
846
846
///
847
- /// # Example
847
+ /// ## Example
848
848
///
849
849
/// ```rust,no_run
850
850
/// # use postgres::{PostgresConnection, PostgresResult};
@@ -982,10 +982,11 @@ impl<'conn> PostgresTransaction<'conn> {
982
982
983
983
/// Like `PostgresConnection::batch_execute`.
984
984
pub fn batch_execute ( & self , query : & str ) -> PostgresResult < ( ) > {
985
- if self . conn . conn . borrow ( ) . trans_depth != self . depth {
985
+ let mut conn = self . conn . conn . borrow_mut ( ) ;
986
+ if conn. trans_depth != self . depth {
986
987
return Err ( PgWrongTransaction ) ;
987
988
}
988
- self . conn . batch_execute ( query)
989
+ conn. quick_query ( query) . map ( |_| ( ) )
989
990
}
990
991
991
992
/// Like `PostgresConnection::transaction`.
@@ -1184,7 +1185,7 @@ impl<'conn> PostgresStatement<'conn> {
1184
1185
///
1185
1186
/// If the statement does not modify any rows (e.g. SELECT), 0 is returned.
1186
1187
///
1187
- /// # Example
1188
+ /// ## Example
1188
1189
///
1189
1190
/// ```rust,no_run
1190
1191
/// # use postgres::{PostgresConnection, NoSsl};
@@ -1231,7 +1232,7 @@ impl<'conn> PostgresStatement<'conn> {
1231
1232
/// Executes the prepared statement, returning an iterator over the
1232
1233
/// resulting rows.
1233
1234
///
1234
- /// # Example
1235
+ /// ## Example
1235
1236
///
1236
1237
/// ```rust,no_run
1237
1238
/// # use postgres::{PostgresConnection, NoSsl};
@@ -1422,12 +1423,12 @@ impl<'stmt> PostgresRow<'stmt> {
1422
1423
/// A field can be accessed by the name or index of its column, though
1423
1424
/// access by index is more efficient. Rows are 0-indexed.
1424
1425
///
1425
- /// # Failure
1426
+ /// ## Failure
1426
1427
///
1427
1428
/// Fails if the index does not reference a column or the return type is
1428
1429
/// not compatible with the Postgres type.
1429
1430
///
1430
- /// # Example
1431
+ /// ## Example
1431
1432
///
1432
1433
/// ```rust,no_run
1433
1434
/// # use postgres::{PostgresConnection, NoSsl};
0 commit comments