CouchBase에 Array로 저장된 내용을 N1QL로 SELECT 하려면!?

in couchbase •  7 years ago 

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!