src/ORM/DataObjectSchema.php
protected function cacheDefaultDatabaseIndexes($class)
    {
        if (array_key_exists($class, $this->defaultDatabaseIndexes)) {
            return $this->defaultDatabaseIndexes[$class];
        }
        $this->defaultDatabaseIndexes[$class] = [];

        $fieldSpecs = $this->fieldSpecs($class, self::UNINHERITED);
        foreach ($fieldSpecs as $field => $spec) {
            /** @var DBField $fieldObj */
            $fieldObj = Injector::inst()->create($spec, $field);
            if ($indexSpecs = $fieldObj->getIndexSpecs()) {
                $this->defaultDatabaseIndexes[$class][$field] = $indexSpecs;
            }
        }
        return $this->defaultDatabaseIndexes[$class];
    }
protected function cacheDefaultDatabaseIndexes($class)
    {
        if (array_key_exists($class, $this->defaultDatabaseIndexes)) {
            return $this->defaultDatabaseIndexes[$class];
        }
        $this->defaultDatabaseIndexes[$class] = [];

        $fieldSpecs = $this->fieldSpecs($class, self::UNINHERITED);
        foreach ($fieldSpecs as $field => $spec) {
            /** @var DBField $fieldObj */
            $fieldObj = Injector::inst()->create($spec, $field);
            if ($indexSpecs = $fieldObj->getIndexSpecs()) {
                $this->defaultDatabaseIndexes[$class][$field] = $indexSpecs;
            }
        }
        return $this->defaultDatabaseIndexes[$class];
    }
protected function cacheDefaultDatabaseIndexes ( $ class ) { if ( array_key_exists ( $ class , $ this -> defaultDatabaseIndexes ) ) { return $ this -> defaultDatabaseIndexes [ $ class ] ; } $ this -> defaultDatabaseIndexes [ $ class ] = [ ] ; $ fieldSpecs = $ this -> fieldSpecs ( $ class , self :: UNINHERITED ) ; foreach ( $ fieldSpecs as $ field => $ spec ) { /** @var DBField $fieldObj */ $ fieldObj = Injector :: inst ( ) -> create ( $ spec , $ field ) ; if ( $ indexSpecs = $ fieldObj -> getIndexSpecs ( ) ) { $ this -> defaultDatabaseIndexes [ $ class ] [ $ field ] = $ indexSpecs ; } } return $ this -> defaultDatabaseIndexes [ $ class ] ; }
Get "default" database indexable field types

@param  string $class

@return array
Get default database indexable field types