@@ -515,7 +515,20 @@ impl Client {
515
515
self . simple_query_raw ( query) . await ?. try_collect ( ) . await
516
516
}
517
517
518
- pub ( crate ) async fn simple_query_raw ( & self , query : & str ) ->Result < SimpleQueryStream , Error > {
518
+ /// Executes a sequence of SQL statements using the simple query protocol, returning the resulting rows as a stream.
519
+ ///
520
+ /// Statements should be separated by semicolons. If an error occurs, execution of the sequence will stop at that
521
+ /// point. The simple query protocol returns the values in rows as strings rather than in their binary encodings,
522
+ /// so the associated row type doesn't work with the `FromSql` trait. Rather than simply returning a list of the
523
+ /// rows, this method returns a list of an enum which indicates either the completion of one of the commands,
524
+ /// or a row of data. This preserves the framing between the separate statements in the request.
525
+ ///
526
+ /// # Warning
527
+ ///
528
+ /// Prepared statements should be use for any query which contains user-specified data, as they provided the
529
+ /// functionality to safely embed that data in the request. Do not form statements via string concatenation and pass
530
+ /// them to this method!
531
+ pub async fn simple_query_raw ( & self , query : & str ) ->Result < SimpleQueryStream , Error > {
519
532
simple_query:: simple_query ( self . inner ( ) , query) . await
520
533
}
521
534