Learn the "why" behind slow queries and how to fix them in our 2-Part Webinar.
Register now >
Docs Menu
Docs Home
/ /

MongoDB\Model\IndexInfo::isTtl()

MongoDB\Model\IndexInfo::isTtl()

インデックスが TTL インデックスであるかどうかを返します。 これは、 MongoDB\Collection::createIndex()expireAfterSecondsオプションと相関します。

function isTtl(): boolean

インデックスが TTL インデックスかどうかを示すブール値。

<?php
$info = new IndexInfo([
'expireAfterSeconds' => 100,
]);
var_dump($info->isTtl());

出力は次のようになります。

bool(true)

戻る

isText()

項目一覧