CouchBase에 Array로 저장된 내용을 N1QL로 SELECT 하려면!?
- UNNEST 를 이용!
SELECT UN.* FROM target-bucket UNNEST target-bucket as UN
CouchBase에서 document id도 함께 SELECT 하려면?
- meta(t).id 를 이용!
SELECT meta(target-bucket).id as docId, * FROM target-bucket
SELECT UN.* FROM target-bucket UNNEST target-bucket as UN
SELECT meta(target-bucket).id as docId, * FROM target-bucket