Couchbase.Management.BucketManager.CreateN1qlPrimaryIndexAsync C# (CSharp) Method

CreateN1qlPrimaryIndexAsync() public method

Creates a primary index on the current IBucket asynchronously.
public CreateN1qlPrimaryIndexAsync ( bool defer = false ) : Task
defer bool If set to true, the N1QL query will use the "with defer" syntax and the index will simply be "pending" (prior to 4.5) or "deferred" (at and after 4.5, see MB-14679).
return Task
        public virtual Task<IResult> CreateN1qlPrimaryIndexAsync(bool defer = false)
        {
            var statement = string.Format(Statements.CreatePrimaryIndex,
                BucketName.N1QlEscape(), defer.ToString().ToLower());

            var result = ExecuteIndexRequestAsync(statement);
            return result;
        }

Same methods

BucketManager::CreateN1qlPrimaryIndexAsync ( string customName, bool defer = false ) : Task