PrimaryKeyDescriptor describes a table secondary index.

from message cosmos.orm.v1.SecondaryIndexDescriptor

Hierarchy

Constructors

Properties

fields: string = ""

fields is a comma-separated list of fields in the index. The supported field types are the same as those for PrimaryKeyDescriptor.fields. Index keys are prefixed by the varint encoded table id and the varint encoded index id plus any additional prefix specified by the schema.

In addition the field segments, non-unique index keys are suffixed with any additional primary key fields not present in the index fields so that the primary key can be reconstructed. Unique indexes instead of being suffixed store the remaining primary key fields in the value..

from field: string fields = 1;

id: number = 0

id is a non-zero integer ID that must be unique within the indexes for this table and less than 32768. It may be deprecated in the future when this can be auto-generated.

from field: uint32 id = 2;

unique: boolean = false

unique specifies that this an unique index.

from field: bool unique = 3;

fields: FieldList = ...
runtime: ProtoRuntime = proto3
typeName: "cosmos.orm.v1.SecondaryIndexDescriptor" = "cosmos.orm.v1.SecondaryIndexDescriptor"

Methods