Skip to content

Commit

Permalink
feature/gcloud 0.26 (#196)
Browse files Browse the repository at this point in the history
* Ver up in README

* Clippy warning fixes

* chore: Google Cloud SDK v0.26 support
  • Loading branch information
abdolence authored Dec 2, 2024
1 parent 19f2ffb commit b1d725f
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tls-webpki-roots = ["gcloud-sdk/tls-webpki-roots"]

[dependencies]
tracing = "0.1"
gcloud-sdk = { version = "0.25.6", default-features = false, features = ["google-firestore-v1"] }
gcloud-sdk = { version = "0.26.0", default-features = false, features = ["google-firestore-v1"] }
hyper = { version = "1" }
struct-path = "0.2"
rvstruct = "0.3.2"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Cargo.toml:

```toml
[dependencies]
firestore = "0.43"
firestore = "0.44"
```

## Examples
Expand Down
2 changes: 1 addition & 1 deletion examples/batch-get-stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct.some_id)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/camel-case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct.some_id)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/consistency-selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct.some_id)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/document-transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct.some_id)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;
}

Expand Down
4 changes: 2 additions & 2 deletions examples/group-query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_PARENT_COLLECTION_NAME)
.document_id(&parent_struct.some_id)
.object(&parent_struct)
.execute()
.execute::<()>()
.await?;

for child_idx in 0..3 {
Expand Down Expand Up @@ -83,7 +83,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.document_id(&child_struct.some_id)
.parent(&parent_path)
.object(&child_struct)
.execute()
.execute::<()>()
.await?;
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/list-docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct.some_id)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;
}

Expand Down
4 changes: 2 additions & 2 deletions examples/nested_collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_PARENT_COLLECTION_NAME)
.document_id(&parent_struct.some_id)
.object(&parent_struct)
.execute()
.execute::<()>()
.await?;

// Creating a child doc
Expand Down Expand Up @@ -82,7 +82,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.document_id(&child_struct.some_id)
.parent(&parent_path)
.object(&child_struct)
.execute()
.execute::<()>()
.await?;

println!("Listing all children");
Expand Down
2 changes: 1 addition & 1 deletion examples/query-with-cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct.some_id)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/read-write-transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(TEST_DOCUMENT_ID)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;

println!("Running transactions...");
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct.some_id)
.object(&my_struct)
.execute()
.execute::<()>()
.await?;
}

Expand Down
1 change: 1 addition & 0 deletions src/db/listen_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub struct FirestoreCollectionDocuments {
pub documents: Vec<String>,
}

#[allow(clippy::large_enum_variant)]
#[derive(Debug, Clone)]
pub enum FirestoreTargetType {
Query(FirestoreQueryParams),
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
//!
#![allow(clippy::new_without_default)]
#![allow(clippy::needless_lifetimes)]
#![forbid(unsafe_code)]

pub mod errors;
Expand Down
2 changes: 1 addition & 1 deletion tests/complex-structure-serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.await?;

// Let's insert some data
db.create_obj(
db.create_obj::<_, (), _>(
TEST_COLLECTION_NAME,
Some(&my_struct.some_id),
&my_struct,
Expand Down
2 changes: 1 addition & 1 deletion tests/crud-integration-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async fn crud_tests() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct2.some_id)
.object(&my_struct2)
.execute()
.execute::<()>()
.await?;

assert_eq!(object_returned, my_struct1);
Expand Down
4 changes: 2 additions & 2 deletions tests/nested-collections-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async fn crud_tests() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_PARENT_COLLECTION_NAME)
.document_id(&parent_struct.some_id)
.object(&parent_struct)
.execute()
.execute::<()>()
.await?;

// Creating a child doc
Expand Down Expand Up @@ -69,7 +69,7 @@ async fn crud_tests() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.document_id(&child_struct.some_id)
.parent(&parent_path)
.object(&child_struct)
.execute()
.execute::<()>()
.await?;

let find_parent: Option<MyParentStructure> = db
Expand Down
4 changes: 2 additions & 2 deletions tests/query-integration-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ async fn crud_tests() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct1.some_id)
.object(&my_struct1)
.execute()
.execute::<()>()
.await?;

db.fluent()
.insert()
.into(TEST_COLLECTION_NAME)
.document_id(&my_struct2.some_id)
.object(&my_struct2)
.execute()
.execute::<()>()
.await?;

let object_stream: BoxStream<MyTestStructure> = db
Expand Down

0 comments on commit b1d725f

Please sign in to comment.