ServerTimestampIndex Property

General info

Label

Index

Description

This setting controls how the Server Timestamp is indexed.

Data type

UInt32

Default value

0 (syslib.model.codes.ServerTimestampIndex.NEUTRAL)

Min value

0

Max value

2

Type

CodingGroup

Code

12888

Symbolic name

MODEL_PROP_SERVERTIMESTAMPINDEX

Lua access code

syslib.model.properties.ServerTimestampIndex

Available since

1.78

Parent properties

ServerTimestamp | ServerTimestamp2

Attributes

Name Tooltip
PROP_CONFIGURABLE The property is configurable and can be changed with DataStudio and the various inmation APIs.
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs.
PROP_HAS_DEFAULT The property has a default value as standard.
PROP_HAS_LOLIMIT The property has a low limit.
PROP_HAS_HILIMIT The property has a high limit.

Codings

Coding group: ServerTimestampIndex

Name Code Label Tooltip

NEUTRAL

0

Neutral

The Server Timestamp index is neither created nor dropped. It may be used by the query optimizer if it is present.

BACKGROUND

1

Create in Background

The Server Timestamp index will be created if it does not exist, in background. Use with caution. Refer to the MongoDB documentation for further details and effects of creating an index on a populated collection, on a replica set, and on a shard set.

FOREGROUND

2

Create in Foreground

The Server Timestamp index will be created if it does not exist, in foreground. Use with EXTREME caution! Refer to the MongoDB documentation for further details and effects of creating an index on a populated collection, on a replica set, and on a shard set.

DROP

3

Drop

All but the primary ID indices are dropped.

Examples

Read from or write to the ServerTimestampIndex property.

  • Lua

  • C#

-- Read from the ServerTimestampIndex
syslib.getvalue("<OBJECT FULL PATH>.CustomTimeSeriesStore2.ServerTimestamp2.ServerTimestampIndex")

-- Write to the ServerTimestampIndex
syslib.setvalue("<OBJECT FULL PATH>.CustomTimeSeriesStore2.ServerTimestamp2.ServerTimestampIndex",
    syslib.model.codes.ServerTimestampIndex.NEUTRAL)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the ServerTimestampIndex
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.CustomTimeSeriesStore2.ServerTimestamp2.ServerTimestampIndex"));
// Write to the ServerTimestampIndex
Result result = sli.WriteValue(sc, new WriteItem(ServerTimestampIndex.NEUTRAL, "<OBJECT FULL PATH>.CustomTimeSeriesStore2.ServerTimestamp2.ServerTimestampIndex"));

A switch-like function of the codings.

function get_coding_name(code)
    local _sti = syslib.model.codes.ServerTimestampIndex
    if _sti.NEUTRAL==code then return 'NEUTRAL'
    elseif _sti.BACKGROUND==code then return 'BACKGROUND'
    elseif _sti.FOREGROUND==code then return 'FOREGROUND'
    elseif _sti.DROP==code then return 'DROP'
    end
end
return get_coding_name(syslib.model.codes.ServerTimestampIndex.NEUTRAL)