Skip to content

Commit 5ffa5fa

Browse files
author
Jove Zhong
committed
Update the inline docs in rs files
1 parent fbb9308 commit 5ffa5fa

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/lib/fetch.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl ProtonClient {
2323
/// let client = ProtonClient::new("http://localhost:8123");
2424
///
2525
/// let mut cursor = client
26-
/// .fetch::<MyRow<'_>>("SELECT ?fields from table(some) WHERE no BETWEEN 500 AND 504")
26+
/// .fetch::<MyRow<'_>>("SELECT ?fields from table(test_stream) WHERE no BETWEEN 500 AND 504")
2727
/// .await
2828
/// .expect("[main/fetch]: Failed to fetch data");
2929
///
@@ -64,7 +64,7 @@ impl ProtonClient {
6464
///
6565
/// let client = ProtonClient::new("http://localhost:8123");
6666
///
67-
/// let query = "SELECT ?fields FROM some WHERE no BETWEEN 0 AND 1";
67+
/// let query = "SELECT ?fields FROM test_stream WHERE no BETWEEN 0 AND 1";
6868
/// let data = client.fetch_all::<MyRow>(query).await.unwrap();
6969
///
7070
/// println!("Received {} records", data.len());
@@ -100,7 +100,7 @@ impl ProtonClient {
100100
/// async fn example() -> Result<()> {
101101
///
102102
/// let client = ProtonClient::new("http://localhost:8123");
103-
/// let query = "select count() from table(table_name)";
103+
/// let query = "select count() from table(test_stream)";
104104
/// let item = client.fetch_one::<u64>(query).await.unwrap();
105105
///
106106
/// println!("Single result: {:#?}", item);
@@ -143,7 +143,7 @@ impl ProtonClient {
143143
///
144144
/// let client = ProtonClient::new("http://localhost:8123");
145145
/// let item_id = 42;
146-
/// let query = "SELECT ?fields FROM some WHERE no = 42";
146+
/// let query = "SELECT ?fields FROM test_stream WHERE no = 42";
147147
/// let item = client.fetch_optional::<MyRow>(query).await.unwrap();
148148
///
149149
/// match item {

src/lib/getters.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl ProtonClient {
1414
///
1515
/// async fn example() -> Result<()> {
1616
///
17-
/// let client = ProtonClient::new("https://api.proton.com");
17+
/// let client = ProtonClient::new("http://localhost:8123");
1818
///
1919
/// let url = client.client().await;
2020
///
@@ -37,11 +37,11 @@ impl ProtonClient {
3737
///
3838
/// async fn example() -> Result<()> {
3939
///
40-
/// let client = ProtonClient::new("https://api.proton.com");
40+
/// let client = ProtonClient::new("http://localhost:8123");
4141
///
4242
/// let url = client.url().await;
4343
///
44-
/// assert_eq!(url, "https://api.proton.com");
44+
/// assert_eq!(url, "http://localhost:8123");
4545
///
4646
/// Ok(())
4747
/// }

src/lib/insert.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl ProtonClient {
3737
///
3838
/// async fn example() -> Result<()> {
3939
///
40-
/// let client = ProtonClient::new("http://localhost:8080");
40+
/// let client = ProtonClient::new("http://localhost:8123");
4141
/// let mut insert = client.insert("table_name").await?;
4242
///
4343
/// insert
@@ -85,7 +85,7 @@ impl ProtonClient {
8585
///
8686
/// async fn example() -> Result<()> {
8787
///
88-
/// let client = ProtonClient::new("http://localhost:8080");
88+
/// let client = ProtonClient::new("http://localhost:8123");
8989
/// let mut inserter = client
9090
/// .inserter("table_name")
9191
/// .await

src/lib/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl ProtonClient {
2828
/// let client = ProtonClient::new("http://localhost:8123");
2929
///
3030
/// client
31-
/// .execute_query("CREATE STREAM IF NOT EXISTS some(no uint32, name string) ORDER BY no")
31+
/// .execute_query("CREATE STREAM IF NOT EXISTS test_stream(no uint32, name string) ORDER BY no")
3232
/// .await
3333
/// .expect("Failed to execute query");
3434
///

0 commit comments

Comments
 (0)