- Reference >
- Enumeration Classes >
- MongoDB\Model\IndexInfo::isTtl()
MongoDB\Model\IndexInfo::isTtl()
On this page
Definition
-
MongoDB\Model\IndexInfo::isTtl Return whether the index is a TTL index. This correlates with the
expireAfterSecondsoption forMongoDB\Collection::createIndex().
Return Values
A boolean indicating whether the index is a TTL index.
Examples
The output would then resemble:
bool(true)
See Also
MongoDB\Collection::createIndex()- listIndexes command reference in the MongoDB manual
- TTL Indexes in the MongoDB manual