From 73ccd68f15dd80535d0ea3a13ae4b9c01796af3f Mon Sep 17 00:00:00 2001 From: Gimi Liang Date: Fri, 27 Sep 2024 11:46:33 -0700 Subject: [PATCH 1/7] inserter now requires the "inserter" feature --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5d76d41..6996106 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ path = "examples/remove/main.rs" [dependencies] -clickhouse = { version = "0.13", features = ["watch"] } +clickhouse = { version = "0.13", features = ["inserter", "watch"] } clickhouse-derive = { version = "0.2" } tokio = { version = "1", features = ["rt-multi-thread", "macros"] } serde = { version = "1.0.196", features = ["derive"] } From 9aac0199ed79d59d667a40f8667657fdad51e489 Mon Sep 17 00:00:00 2001 From: Gimi Liang Date: Fri, 27 Sep 2024 11:50:48 -0700 Subject: [PATCH 2/7] with_max_entries -> with_max_rows --- src/lib/insert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/insert.rs b/src/lib/insert.rs index 7a18781..043cb24 100644 --- a/src/lib/insert.rs +++ b/src/lib/insert.rs @@ -90,7 +90,7 @@ impl ProtonClient { /// .inserter("table_name") /// .await /// .expect("Failed to create inserter") - /// .with_max_entries(100_000); // The maximum number of rows in one INSERT statement. + /// .with_max_rows(100_000); // The maximum number of rows in one INSERT statement. /// /// for i in 0..1000 { /// inserter.write(&MyRow { no: i, name: "foo" }).await.expect("Failed to insert row"); From b1a211d9d16ec8ee25e07a9b4ad5d07c8a35287e Mon Sep 17 00:00:00 2001 From: Gimi Liang Date: Fri, 27 Sep 2024 11:52:53 -0700 Subject: [PATCH 3/7] updated CODEOWNERS --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index a345de4..9ee6f47 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -14,4 +14,4 @@ # This should make it easy to add new rules without breaking existing ones. # Global rule: -* @marvin-hansen @jovezhong +* @marvin-hansen @jovezhong @zliang-min From 8741b6e21f5f788587e1ac800b8444282e8b53c3 Mon Sep 17 00:00:00 2001 From: Gimi Liang Date: Fri, 27 Sep 2024 11:54:16 -0700 Subject: [PATCH 4/7] inserter.write does not return a Future --- src/lib/insert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/insert.rs b/src/lib/insert.rs index 043cb24..4696d06 100644 --- a/src/lib/insert.rs +++ b/src/lib/insert.rs @@ -93,7 +93,7 @@ impl ProtonClient { /// .with_max_rows(100_000); // The maximum number of rows in one INSERT statement. /// /// for i in 0..1000 { - /// inserter.write(&MyRow { no: i, name: "foo" }).await.expect("Failed to insert row"); + /// inserter.write(&MyRow { no: i, name: "foo" }).expect("Failed to insert row"); /// inserter.commit().await.expect("Failed to commit"); // Checks limits and ends a current INSERT if they are reached. /// } /// From 2b682a3de82d813fea6ad6a8108d7db106fbad63 Mon Sep 17 00:00:00 2001 From: Gimi Liang Date: Fri, 27 Sep 2024 12:04:22 -0700 Subject: [PATCH 5/7] rustsec/audit-check@v2 --- .github/workflows/rust-audit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index 61251a1..c96ff58 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -18,6 +18,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Audit Check # https://github.com/rustsec/audit-check/issues/2 - uses: rustsec/audit-check@master + uses: rustsec/audit-check@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} From 2f6b52c4168ba5b75fc5f8aaa7f614a3feb6f02e Mon Sep 17 00:00:00 2001 From: Gimi Liang Date: Fri, 27 Sep 2024 12:07:35 -0700 Subject: [PATCH 6/7] rustsec/audit-check@v2.0.0 --- .github/workflows/rust-audit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index c96ff58..67580a9 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Audit Check # https://github.com/rustsec/audit-check/issues/2 - uses: rustsec/audit-check@v2 + - name: Audit Check + uses: rustsec/audit-check@v2.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} From 425f6a5f61dbc3b610c2118bb8acceb0e0f05a90 Mon Sep 17 00:00:00 2001 From: Gimi Liang Date: Fri, 27 Sep 2024 12:17:15 -0700 Subject: [PATCH 7/7] run cargo update before rustsec/audit-check --- .github/workflows/rust-audit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust-audit.yml b/.github/workflows/rust-audit.yml index 67580a9..aaaae8f 100644 --- a/.github/workflows/rust-audit.yml +++ b/.github/workflows/rust-audit.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: cargo update - name: Audit Check uses: rustsec/audit-check@v2.0.0 with: