RowPolicyAction

This enum represents the row-policy action a row policy governs (query/search/insert/delete/upsert/iterators).

public enum RowPolicyAction
{
    Unknown = -1,
    Query = 0,
    Search = 1,
    Insert = 2,
    Delete = 3,
    Upsert = 4,
    QueryIterator = 5,
    SearchIterator = 6,
    HybridSearch = 7
}

Constants:

  • Unknown (-1)

    Unknown action. Returned when the server reports an action code that has no mapped value.

  • Query (0)

    Query action.

  • Search (1)

    Search action.

  • Insert (2)

    Insert action.

  • Delete (3)

    Delete action.

  • Upsert (4)

    Upsert action.

  • QueryIterator (5)

    Query iterator action.

  • SearchIterator (6)

    Search iterator action.

  • HybridSearch (7)

    Hybrid search action.

Example

using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Rls;
using Milvus.Client.V2.Types;

using var client = new MilvusClientV2(new ConnectConfig
{
    Uri = "localhost:19530",
    Username = "root",
    Password = "Milvus"
});

await client.CreateRowPolicyAsync(new CreateRowPolicyReq
{
    CollectionName = "my_collection",
    PolicyName = "policy_1",
    PolicyType = RowPolicyType.Permissive,
    Actions = [RowPolicyAction.Query, RowPolicyAction.Insert],
    UsingExpr = "age > 18",
    CheckExpr = "age > 18"
});

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?