Discussion:
iOS:CBL 2.0: Some questions.
p***@decurtis.com
2018-07-09 06:08:53 UTC
Permalink
Below are some queries related to CBL 2.0:
1. How we can have access to revision of a document like the class
CBLRevision in CouchbaseLite 1.4.1? Or the things like this is no more
available in 2.0?
2. For a document having zip file as attachments which may be as big as
20MB, it seems we have to use InputStream for downloading it, right? If
Yes, then what will be the attachment url that the input stream will use to
download it?
3. In 1.4.1, we do have NSProgress class available to measure the download
progress of attachments which seems no more available in 2.0 then how one
will measure the download progress?

Thanks
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/260010d5-a81b-42ae-949a-24e6e530557b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
p***@decurtis.com
2018-07-09 10:54:13 UTC
Permalink
Post by p***@decurtis.com
1. How we can have access to revision of a document like the class
CBLRevision in CouchbaseLite 1.4.1? Or the things like this is no more
available in 2.0?
2. For a document having zip file as attachments which may be as big as
20MB, it seems we have to use InputStream for downloading it, right? If
Yes, then what will be the attachment url that the input stream will use to
download it?
3. In 1.4.1, we do have NSProgress class available to measure the download
progress of attachments which seems no more available in 2.0 then how one
will measure the download progress?
4. When a document is deleted, what the databaseChangeListener will
return in that case? How a deletion will be identified in this case?
Post by p***@decurtis.com
Thanks
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/f33da237-6ccb-492e-bb6f-4482933f82f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Jens Alfke' via Couchbase Mobile
2018-07-09 17:15:11 UTC
Permalink
On Jul 8, 2018, at 11:08 PM, ***@decurtis.com<mailto:***@decurtis.com> wrote:

1. How we can have access to revision of a document like the class CBLRevision in CouchbaseLite 1.4.1? Or the things like this is no more available in 2.0?

Revisions aren't available in the public API because we didn't see enough use cases for them (Couchbase Lite is not a version control system!), and leaving them out simplifies our architecture.

2. For a document having zip file as attachments which may be as big as 20MB, it seems we have to use InputStream for downloading it, right? If Yes, then what will be the attachment url that the input stream will use to download it?

No, you can get the attachment data directly as a [NS]Data object.
If you get it as a stream, there is no URL associated with the stream. It's just an NSInputStream.

3. In 1.4.1, we do have NSProgress class available to measure the download progress of attachments which seems no more available in 2.0 then how one will measure the download progress?

Attachments are download as part of replication, not when you access them. The overall replication progress includes the progress of attachments being downloaded.

4. When a document is deleted, what the databaseChangeListener will return in that case? How a deletion will be identified in this case?

The listener still tells you the IDs of the changed docs, including the deleted ones. If you try to get a deleted document, you'll get a not-found error.

—Jens
Privacy Policy<https://www.couchbase.com/privacy-policy> | Update Marketing Preferences<https://info.couchbase.com/unsubscribe-or-manage-preferences>
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/8589598E-8B82-4AF9-9086-61C48AD88F0C%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.
p***@decurtis.com
2018-07-11 13:46:58 UTC
Permalink
Thanks Jens for the replies.

Below are some more questions:
1. It seems deferred download of attachments has been removed in CBL 2.0
for iOS, right?
2. For a document D1 that is having attachment A1 (initially). If we
updated some properties of the document and also updated the attachment
such that it is now A2, then how CBL 2.0 will be able to identify if the
attachment is available as A1 or A2? In short, we want to know how CBL 2.0
distinguishes updates in attachment in the document?

Thanks
Post by p***@decurtis.com
1. How we can have access to revision of a document like the class
CBLRevision in CouchbaseLite 1.4.1? Or the things like this is no more
available in 2.0?
Revisions aren't available in the public API because we didn't see enough
use cases for them (Couchbase Lite is not a version control system!), and
leaving them out simplifies our architecture.
2. For a document having zip file as attachments which may be as big as
20MB, it seems we have to use InputStream for downloading it, right? If
Yes, then what will be the attachment url that the input stream will use to
download it?
No, you can get the attachment data directly as a [NS]Data object.
If you get it as a stream, there is no URL associated with the stream.
It's just an NSInputStream.
3. In 1.4.1, we do have NSProgress class available to measure the download
progress of attachments which seems no more available in 2.0 then how one
will measure the download progress?
Attachments are download as part of replication, not when you access them.
The overall replication progress includes the progress of attachments being
downloaded.
4. When a document is deleted, what the databaseChangeListener will
return in that case? How a deletion will be identified in this case?
The listener still tells you the IDs of the changed docs, including the
deleted ones. If you try to get a deleted document, you'll get a not-found
error.
—Jens
Privacy Policy <https://www.couchbase.com/privacy-policy> | Update
Marketing Preferences
<https://info.couchbase.com/unsubscribe-or-manage-preferences>
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/293e280d-bfb0-4940-9611-767d3a0fd8bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Jens Alfke' via Couchbase Mobile
2018-07-11 15:53:51 UTC
Permalink
1. It seems deferred download of attachments has been removed in CBL 2.0 for iOS, right?
Yes. Or rather, it wasn’t a fully cross-platform feature in 1.x, and going forward we’re only releasing features with cross-platform support. We hope to (re)implement this soon in a future release.
2. For a document D1 that is having attachment A1 (initially). If we updated some properties of the document and also updated the attachment such that it is now A2, then how CBL 2.0 will be able to identify if the attachment is available as A1 or A2? In short, we want to know how CBL 2.0 distinguishes updates in attachment in the document?
By the ‘digest’ property in the blob metadata stored in the document, which is a base64-encoded SHA-2 digest of the contents.

—Jens
Privacy Policy<https://www.couchbase.com/privacy-policy> | Update Marketing Preferences<https://info.couchbase.com/unsubscribe-or-manage-preferences>
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/D849F51E-D2A7-45CE-846C-C1649A64C268%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.
Loading...