Spring data couchbase N1QL

Is there a way in N1QL where i can use the rownum(currentrow) value to generate the Id?
Below is the example query i am planning to use.

UPDATE bucketName
SET STATUS = “NEW”,
ID = :#{#abc.Id} || ‘_’ || to_char( floor ((rownum - 1) / to_number(:#{#abc.maxRecords})) + 1 )
AND (STATUS IS NULL OR STATUS = ‘OPEN’)

Please let me know. Thanks

There is no rownum in N1QL. If you want generate unique id you can use UUID()

Thank you @vsr1. Could you please provide an example.

UUID() is function you can use any place.

 SELECT UUID() AS uuid;
{
    "requestID": "d384cbf3-1cec-4a04-8429-b23a734048e0",
    "signature": {
        "uuid": "string"
    },
    "results": [
        {
            "uuid": "33038c58-2324-495e-ab20-c25a02f9c8a7"
        }
    ],
    "status": "success",
    "metrics": {
        "elapsedTime": "1.629117ms",
        "executionTime": "1.606436ms",
        "resultCount": 1,
        "resultSize": 70
    }
}

Thank you for your help @vsr1 :).