Skip to content

Commit

Permalink
Use empty string rather than _default for default scope/collection
Browse files Browse the repository at this point in the history
This is what lcb expects.
  • Loading branch information
chvck committed Dec 9, 2020
1 parent 7128b2c commit 813c372
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions couchbase/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,7 @@ impl Bucket {
/// The collection API provides acess to the Key/Value operations. The default collection is also
/// implicitly using the default scope.
pub fn default_collection(&self) -> Collection {
Collection::new(
self.core.clone(),
"_default".into(),
"_default".into(),
self.name.clone(),
)
Collection::new(self.core.clone(), "".into(), "".into(), self.name.clone())
}

/// The name of the bucket
Expand All @@ -270,12 +265,7 @@ impl Bucket {
/// * `name` - the collection name
#[cfg(feature = "volatile")]
pub fn collection<S: Into<String>>(&self, name: S) -> Collection {
Collection::new(
self.core.clone(),
name.into(),
"_default".into(),
self.name.clone(),
)
Collection::new(self.core.clone(), name.into(), "".into(), self.name.clone())
}

/// Opens a custom scope
Expand Down Expand Up @@ -379,7 +369,7 @@ impl Collection {
Self {
core,
name,
scope_name: scope_name,
scope_name,
bucket_name,
}
}
Expand Down

0 comments on commit 813c372

Please sign in to comment.