Couchbase.N1QL.QueryRequest.ScanWait C# (CSharp) Method

ScanWait() public method

Specifies the maximum time the client is willing to wait for an index to catch up to the vector timestamp in the request. If an index has to catch up, and the ScanWait time is exceed doing so, an error is returned.
Optional.
public ScanWait ( System.TimeSpan scanWait ) : IQueryRequest
scanWait System.TimeSpan The maximum time the client is willing to wait for index to catch up to the vector timestamp.
return IQueryRequest
        public IQueryRequest ScanWait(TimeSpan scanWait)
        {
            _scanWait = scanWait;
            return this;
        }

Usage Example

        public void When_ScanWait_Is_Set_Request_Has_The_Value()
        {
            var queryRequest = new QueryRequest("SELECT * FROM default;");
            queryRequest.ScanWait(TimeSpan.FromSeconds(10));

            var query = queryRequest.GetFormValues();
            Assert.AreEqual("10000ms", query["scan_wait"]);
        }