PHP Class Webiny\Component\Mongo\Index\SingleIndex

Inheritance: extends Webiny\Component\Mongo\Index\IndexAbstract
Show file Open project: Webiny/Framework

Protected Properties

Property Type Description
$ttl

Public Methods

Method Description
__construct ( string $name, string $field, boolean $sparse = false, boolean $unique = false, boolean $dropDuplicates = false, boolean $ttl = false )
getOptions ( )

Method Details

__construct() public method

public __construct ( string $name, string $field, boolean $sparse = false, boolean $unique = false, boolean $dropDuplicates = false, boolean $ttl = false )
$name string Index name
$field string Index field, ex: title (ascending), -title (descending)
$sparse boolean Is index sparse?
$unique boolean Is index unique?
$dropDuplicates boolean Drop duplicate documents (only if $unique is used)
$ttl boolean Document TTL (will only work for date and datetime fields)

getOptions() public method

public getOptions ( )

Property Details

$ttl protected property

protected $ttl