Select all properties without one property

n1ql

#1

I am using Sync Gateway with Couchabse Server,and when I query data by N1QL,all docs will be added _sync property,I want to query docs without _sync property,
How can I write N1QL?
for example , I have 4 docs:

{"id":"id-1","type":"type1","prop11":"value11","prop12":"value12","_sync":"some_value"}
{"id":"id-2","type":"type2","prop21":"value21","prop22":"value22","_sync":"some_value"}
{"id":"id-3","type":"type3","prop31":"value31","prop32":"value2","_sync":"some_value"}
{"id":"id-4","type":"type4","prop41":"value41","prop42":"value2","_sync":"some_value"}

I want to get docs as following result:

{"id":"id-1","type":"type1","prop11":"value11","prop12":"value12"}
{"id":"id-2","type":"type2","prop21":"value21","prop22":"value22"}
{"id":"id-3","type":"type3","prop31":"value31","prop32":"value2"}
{"id":"id-4","type":"type4","prop41":"value41","prop42":"value2"}


#2

You can use object_remove() function in couchbase4.5. For ex:
select object_remove(default, “_sync”) from default;

Documentation at:
http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/objectfun.html


#3

How about in Couchbase 4.1.0?