Skip to content

Commit b3041bf

Browse files
committed
remove deprecated Query::raw_read_query
1 parent 6fe9498 commit b3041bf

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

influxdb/src/integrations/serde_integration/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//! # #[tokio::main]
2525
//! # async fn main() -> Result<(), influxdb::Error> {
2626
//! let client = Client::new("http://localhost:8086", "test");
27-
//! let query = Query::raw_read_query(
27+
//! let query = ReadQuery::new(
2828
//! "SELECT temperature FROM /weather_[a-z]*$/ WHERE time > now() - 1m ORDER BY DESC",
2929
//! );
3030
//! let mut db_result = client.json_query(query).await?;

influxdb/src/query/mod.rs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! # Examples
55
//!
66
//! ```rust
7-
//! use influxdb::{Query, Timestamp};
7+
//! use influxdb::{ReadQuery, Timestamp};
88
//! use influxdb::InfluxDbWriteable;
99
//!
1010
//! let write_query = Timestamp::Nanoseconds(0).into_query("measurement")
@@ -14,7 +14,7 @@
1414
//!
1515
//! assert!(write_query.is_ok());
1616
//!
17-
//! let read_query = Query::raw_read_query("SELECT * FROM weather")
17+
//! let read_query = ReadQuery::new("SELECT * FROM weather")
1818
//! .build();
1919
//!
2020
//! assert!(read_query.is_ok());
@@ -195,25 +195,6 @@ impl InfluxDbWriteable for Timestamp {
195195
}
196196
}
197197

198-
impl dyn Query {
199-
/// Returns a [`ReadQuery`](crate::ReadQuery) builder.
200-
///
201-
/// # Examples
202-
///
203-
/// ```rust
204-
/// use influxdb::Query;
205-
///
206-
/// Query::raw_read_query("SELECT * FROM weather"); // Is of type [`ReadQuery`](crate::ReadQuery)
207-
/// ```
208-
#[deprecated(since = "0.5.0", note = "Use ReadQuery::new instead")]
209-
pub fn raw_read_query<S>(read_query: S) -> ReadQuery
210-
where
211-
S: Into<String>,
212-
{
213-
ReadQuery::new(read_query)
214-
}
215-
}
216-
217198
#[derive(Debug)]
218199
#[doc(hidden)]
219200
pub struct ValidQuery(String);

influxdb/src/query/read_query.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
//! Read Query Builder returned by Query::raw_read_query
2-
//!
3-
//! Can only be instantiated by using Query::raw_read_query
1+
//! Read Query Builder
42
53
use crate::query::{QueryType, ValidQuery};
64
use crate::{Error, Query};

0 commit comments

Comments
 (0)