Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
3.0.0-beta.3
-
None
-
1
-
SDK13: Coll/Txn/Docs More Chip, SDK15: Ruby/Coll/Docs
Description
For instance, if you have a collection, it is pretty natural to expect a method (or property) bucket, which gives you the bucket it is associate with. Sadly, collection.bucket returns a CoreClient instance. So if you think that is a couchbase.Bucket, but you will be disappointed as the CoreClient has sort of the interface you'd expect (plus all the collection stuff) but none of the wrappers. So for instance: collection.bucket.ping() returns a dict, not a PingResult. Now... should it return a couchbase.Bucket object that has the same CoreClient that the collection is using as a base? Probably. Let's explore that a bit.
An alternative is what java did – the collection just returns the bucket_name, and if you want a Bucket object you open it separately with a call to cluster.bucket(bucket_name). That's fine too. Whatever gets the job done.
Same for Scope – either a Scope object or the name of the scope needs to be accessible.
Another example: You'd expect a collection object would have a property that returns its own name.
This is just what I have noticed so far. For this ticket, take some time to look harder if possible and potentially we will find more. Maybe use java's implementation as a guide.
Probably the bucket and cluster interfaces need a look as well, just have not done that yet