I was trying to wrap my head around the difference between documentID and sourceDocumentID but just couldn't. Should I access the documentID of the row or sourceDocumentID? I'm trying to implement pagination in my iOS app (i.e something similar to futon) so, I need the last documentID to generate next set of rows. Can someone please enlighten me?
Difference between CBLQuery's(a.k.a CouchQuery's) documentID and sourceDocumentID
121 Views Asked by Ajith Renjala At
2
There are 2 best solutions below
0
pushpendra chauhan
On
documentID and sourceDocumentID both refers to same id until or unless at the point of creating view in your map function you explicitly put reference of some other document's id, In this scenario your document id will be overriden by some other doc id and you can still refer to original id by calling sourceDocumentID
Please refer this link they have explained about it very well here http://developer.couchbase.com/documentation/mobile/1.1.0/develop/guides/couchbase-lite/native-api/view/index.html
Related Questions in COUCHDB
- Keep a webview app of Android running in the background
- fetch data from couchdb to node.js file
- CouchDB _approx_count_distinct
- Couchdb python - Upload Attachment with put_attachment
- Couchdb illegal_database_name error when creating database
- CouchDB `_find` api `$elemMatch` fails to find matching record
- How to build Erlang v24 for couchdb?
- Docker Desktop couchDB - Apple Mac M1
- can I ask couchdb `_change` API to return all document change history?
- How to implement lazy pagination in CouchDB?
- is it even possible to use multiple indices to query a design document view in CouchDB?
- CouchDB view javascript only supports a subset of JS features?
- How to query a sub-element of the design document in CouchDB?
- Does CouchDB /_changes?since=X request give older feed before X?
- Count query in CouchDB
Related Questions in COUCHBASE
- Couchbase Sync Gateway randomly failing to authenticate using mTLS
- how to fetch data when package structure deleted in source, but in couchbase document, _class with old package structure is present
- Recommended way for deleting "_txn" documents from Couchbase?
- How to query an array within an array with couchbase
- Cloudron Custom App (Couchbase) install fails: ECONNREFUSED
- Does couchbase eventing service stores events indefinitely?
- ClassNotFoundException while connecting to Couchbase
- i cannot use let or for clauses in my query, it always says its a reserved keyword
- Couchbase backup to S3 with Kubernetes service account role attachment is possible?
- Flutter & Couchbase in Android Studio: Process 'command 'C:/Program Files/Git/bin/bash'' finished with non-zero exit value 35
- Different Lcb wait3 API flags meaning
- Why is GSI creation so slow?
- Index creation and memory issue on Couchbase version 6.6
- ECS task Failed With couchbase database
- Couchbase Why a simple query is slow on nodejs?
Related Questions in TOUCHDB
- The pricing programs of hosted CouchDB providers do not make sense
- Couchdb - is it possible to "disreplicate" a replicated document
- Duplicate symbol error when using TouchDB and FMDB wrapper together
- CBLite Android - Get values in second level
- Migrate between two CouchDB designs
- TouchDB saves the attachment but does not save the property
- Difference between CBLQuery's(a.k.a CouchQuery's) documentID and sourceDocumentID
- How do I include class TDCollateJSon in my my code?
- _replicate db does not exists in couchDb on Android
- LiteServAndroid could not able to configuring project
- View TouchDB mobile database in desktop
- Replication from CouchDB to TouchDB
- TouchDB - CouchbaseLite Libraries?
- Gradle: Project "x" not found in root project "myProject"
- Cost of continuous replications vs one-shot replications (using TouchDB and Cloudant)
Related Questions in COUCHCOCOA
- Swift Undefined architecture x86_64 in Xcode 6 Beta 5
- Difference between CBLQuery's(a.k.a CouchQuery's) documentID and sourceDocumentID
- Couchbase Lite iOS: CouchCocoa's unversionedURL and CouchbaseLite's bodyURL, are they same?
- couchbase ios replication error
- Delete multiple documents in CouchDB
- CouchDB delete and recreate a document
- Cloudant / CouchDB "pull" replication for 600+ documents to iPhone
- How to create a MonoTouch binding from a .framework
- Get Attachment from documentProperties in couchCocoa
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can implements pagination by using two levels of Reference Documents (http://docs.couchbase.com/couchbase-devguide-2.1/#using-reference-documents-for-lookups)
Create reference document(1st level), that contains ids of another ref. documents(2nd level). This ref. docs on 2nd level will be your pages. If something is not clear, I am ready to explain more.