DROP TTL statement¶
The DROP TTL statement deletes the time-to-live (TTL) duration set on edges of a specific graph by edge type.
To specify the graph, use either of the following methods:
- Add a USE clause before this statement to set the working graph.
- Use SESSION SET to set the graph for the current session in advance.
If both methods are used, the one specified in the USE clause takes precedence. If neither is used, an error occurs.
Note
An operation involving a non-default schema or an object in it requires access to the schema, either implicitly or through an explicit USAGE grant, as well as the privilege required for the operation. The schema access check and the privilege check for the requested operation are independent; satisfying one does not satisfy the other. Schema access control does not apply to temporary graphs or built-in procedures and functions. For more information, see Schema access control.
Prerequisites¶
- A TTL duration must be set on edges. For more information, see CREATE TTL.
- To delete a TTL duration, you must either be the owner of the graph, be granted to perform the action
ALTERon the graph, or be granted to perform the actionALTER ANY GRAPHon the used schema. For more information, see Roles and privileges.
Syntax¶
- drop_ttl_statement
drop_ttl_statement ::=
'DROP' 'TTL' 'ON' 'EDGE' edge_type_name
Parameters¶
edge_type_name¶
The name of the edge type for which you want to delete the TTL duration.
Examples¶
The following examples are based on the example dataset.
Delete the TTL duration of an edge type¶
USE movie DROP TTL ON EDGE Watch
The preceding example deletes the TTL duration that is set in CREATE TTL.