At the attention of Couchbase team,
I noticed that meta().expiration and expiration in meta() have two different values.
For examples:
SELECT meta().expiration FROM bastard WHERE meta().id = '8e956674-014e-4d6e-b46b-79ba7f916089'
[
{
"expiration": 1681383097
}
]
Where instead:
SELECT meta() FROM bastard WHERE meta().id = '8e956674-014e-4d6e-b46b-79ba7f916089'
[
{
"$1": {
"cas": 1678704697273352200,
"expiration": 0,
"flags": 33554438,
"id": "8e956674-014e-4d6e-b46b-79ba7f916089",
"keyspace": "default:bastard",
"type": "json"
}
}
]
It interesting to note that if I use the two attributes together, then the correct value is returned:
SELECT meta(), meta().expiration FROM bastard WHERE meta().id = '8e956674-014e-4d6e-b46b-79ba7f916089'
[
{
"$1": {
"cas": 1678704697273352200,
"expiration": 1681383097,
"flags": 0,
"id": "8e956674-014e-4d6e-b46b-79ba7f916089",
"type": "json",
"xattrs": {
"$document.exptime": 1681383097
}
},
"expiration": 1681383097
}
]
I am using Community Edition 7.1.1 build 3175.
To do these examples I used the UI interface of Couchbase.