Hi,
I have been using Couchbase Mobile for iOS App. I used Sync Gateway for replication of data. Now i want to build a Web Admin on Web Browser to access and create data on Couchbase. Now Application working good with Couchbase Mobile for iOS App.
I decided to use N1QL REST API to do CRUD operations on Web Browser. i’m able to fetch data from Server by using N1QL query.
Now its time to insert new users data into couchbase server and it mush work with Couchbase Sync Gateway.
I used following N1QL query. but here i’m wonder why to mention document name, because its taking as a Document Id. When i work with Sync Gateway. i didn’t mention any key for Document Creation. So how to insert a new document into Couchbase without any manual Document name as like SyncGateway.
INSERT INTO default (KEY, VALUE) VALUES (“odwalla-juice3321”, { “productId”: “odwalla-juice123”, “unitPrice”: 4.40, “type”: “produc2t2”, “color”:“red”})
- How to find out Document ID on following query.
select * from default
Because some times. i can use result document ID to fetch other documents. Now data looks like below.