Getttl Command

TcaplusDB Client - Getttl Command

For TcaplusDB Client Instructions, see Document.

1. Function Descriptions

Get the Time To Live (TTL) of the specified data.

After setting the TTL of the data, users can use the getttl command to view the remaining life time of the data (with the precision of milliseconds), that is, how long the data will be deleted due to expiration.

The getttl command can only get the TTL of one record at a time. It does not support get the TTL of multiple records at a time.

2. Initial Version

3.50.0

3. Command Syntax

getttl from [table]  where key1 = 1 and key2 = "abc";

Parameter description:

ParameterRequired or notLimitationsDescription
tableYesNoneTable Name
keyYesFor TDR table, the values of all primary key fields must be filled inPrimary key field

4. Command Example

See Table Definition Example for table definition.

tcaplus> getttl from test_table where gameid = 1 and itemid = 2 and name = "abc";
The time to live is 2000 milliseconds.

5. Common Errors

Refer to Common Errors.

[TDR Generic Table][C++ SDK] Interface Description for Getting Data Expiration.

[TDR Generic Table][Go SDK] Interface Description for Getting Data Expiration.

[PB Generic Table][C++ SDK] Interface Description for Getting Data Expiration.

[TDR Generic Table][Go SDK] Interface Description for Getting Data Expiration.