@@ -1022,11 +1022,12 @@ impl<'conn> PostgresTransaction<'conn> {
10221022 ///
10231023 /// No more than `row_limit` rows will be stored in memory at a time. Rows
10241024 /// will be pulled from the database in batches of `row_limit` as needed.
1025- /// If `row_limit` is 0, `lazy_query` is equivalent to `query`.
1025+ /// If `row_limit` is less than or equal to 0, `lazy_query` is equivalent
1026+ /// to `query`.
10261027 pub fn lazy_query < ' trans , ' stmt > ( & ' trans self ,
10271028 stmt : & ' stmt PostgresStatement ,
10281029 params : & [ & ToSql ] ,
1029- row_limit : u32 )
1030+ row_limit : i32 )
10301031 -> PostgresResult < PostgresLazyRows
10311032 < ' trans , ' stmt > > {
10321033 if self . conn as * _ != stmt. conn as * _ {
@@ -1083,7 +1084,7 @@ impl<'conn> PostgresStatement<'conn> {
10831084 Ok ( ( ) )
10841085 }
10851086
1086- fn inner_execute ( & self , portal_name : & str , row_limit : u32 , params : & [ & ToSql ] )
1087+ fn inner_execute ( & self , portal_name : & str , row_limit : i32 , params : & [ & ToSql ] )
10871088 -> PostgresResult < ( ) > {
10881089 if self . param_types . len ( ) != params. len ( ) {
10891090 return Err ( PgWrongParamCount {
@@ -1127,7 +1128,7 @@ impl<'conn> PostgresStatement<'conn> {
11271128 }
11281129 }
11291130
1130- fn lazy_query < ' a > ( & ' a self , row_limit : u32 , params : & [ & ToSql ] )
1131+ fn lazy_query < ' a > ( & ' a self , row_limit : i32 , params : & [ & ToSql ] )
11311132 -> PostgresResult < PostgresRows < ' a > > {
11321133 let id = self . next_portal_id . get ( ) ;
11331134 self . next_portal_id . set ( id + 1 ) ;
@@ -1254,7 +1255,7 @@ pub struct PostgresRows<'stmt> {
12541255 stmt : & ' stmt PostgresStatement < ' stmt > ,
12551256 name : String ,
12561257 data : RingBuf < Vec < Option < Vec < u8 > > > > ,
1257- row_limit : u32 ,
1258+ row_limit : i32 ,
12581259 more_rows : bool ,
12591260 finished : bool ,
12601261}
0 commit comments