I use N1QL to select list of results, but seem to be that the results not shown ID of these documents.
So how do use N1QL query that the result includes doc.id?
I use N1QL to select list of results, but seem to be that the results not shown ID of these documents.
So how do use N1QL query that the result includes doc.id?
select meta(t).id from t;
Thanks @geraldss.
It’s done.
How make order with this query please.
thx
SELECT META(t).id
FROM t
ORDER BY META(t).id;
thx Geral
(from Orange Sophia Antipolis 18/02/16 )
Salut Marwen!
Salut Gerald
Thx for again for the presentation in February and for your answer
Hi, I have a little question about it
its possible get in a single response all the document and the id?
SELECT META().id, * FROM app WHERE type='example'
The response is something like:
[ { "app": { "disabled": false, "email": "juan.ramirez@test.ai", "first_name": "ivan", "role": "admin", "type": "userprofile" }, "id": "documentidxxx" } ]
I would like get the response:
[
{
"id": "documentidxxx"
"disabled": false,
"email": "juan.ramirez@test.ai",
"first_name": "ivan",
"role": "admin",
"type": "userprofile"
}
]
It is possible?
Thnks
SELECT META().id, app.*
FROM app WHERE type="example";
Note: If there is already id filed inside the document it will be overwritten. You need to alias to new one.