@@ -87,7 +87,7 @@ impl Query {
8787
8888 /// Executes the query, returning a [`RowJsonCursor`] to obtain results.
8989 #[ cfg( feature = "watch" ) ]
90- pub fn json < T > ( mut self ) -> Result < watch:: RowJsonCursor < T > > {
90+ pub fn fetch_json < T > ( mut self ) -> Result < watch:: RowJsonCursor < T > > {
9191 self . sql . append ( " FORMAT JSONEachRowWithProgress" ) ;
9292
9393 let response = self . do_execute ( true ) ?;
@@ -98,11 +98,11 @@ impl Query {
9898 ///
9999 /// Note that `T` must be owned.
100100 #[ cfg( feature = "watch" ) ]
101- pub async fn json_one < T > ( self ) -> Result < T >
101+ pub async fn fetch_json_one < T > ( self ) -> Result < T >
102102 where
103103 T : for < ' b > Deserialize < ' b > ,
104104 {
105- match self . json ( ) ?. next ( ) . await {
105+ match self . fetch_json ( ) ?. next ( ) . await {
106106 Ok ( Some ( row) ) => Ok ( row) ,
107107 Ok ( None ) => Err ( Error :: RowNotFound ) ,
108108 Err ( err) => Err ( err) ,
@@ -113,24 +113,24 @@ impl Query {
113113 ///
114114 /// Note that `T` must be owned.
115115 #[ cfg( feature = "watch" ) ]
116- pub async fn json_optional < T > ( self ) -> Result < Option < T > >
116+ pub async fn fetch_json_optional < T > ( self ) -> Result < Option < T > >
117117 where
118118 T : for < ' b > Deserialize < ' b > ,
119119 {
120- self . json ( ) ?. next ( ) . await
120+ self . fetch_json ( ) ?. next ( ) . await
121121 }
122122
123123 /// Executes the query and returns all the generated results,
124124 /// collected into a [`Vec`].
125125 ///
126126 /// Note that `T` must be owned.
127127 #[ cfg( feature = "watch" ) ]
128- pub async fn json_all < T > ( self ) -> Result < Vec < T > >
128+ pub async fn fetch_json_all < T > ( self ) -> Result < Vec < T > >
129129 where
130130 T : for < ' b > Deserialize < ' b > ,
131131 {
132132 let mut result = Vec :: new ( ) ;
133- let mut cursor = self . json :: < T > ( ) ?;
133+ let mut cursor = self . fetch_json :: < T > ( ) ?;
134134
135135 while let Some ( row) = cursor. next ( ) . await ? {
136136 result. push ( row) ;
0 commit comments