You are here

public function DatabaseStorageSortedBase::getCount in Key-value Extensions 8

Return value

integer

Overrides KeyValueStoreSortedInterface::getCount

1 method overrides DatabaseStorageSortedBase::getCount()
DatabaseStorageSortedSet::getCount in src/KeyValueStore/DatabaseStorageSortedSet.php

File

src/KeyValueStore/DatabaseStorageSortedBase.php, line 40

Class

DatabaseStorageSortedBase

Namespace

Drupal\key_value\KeyValueStore

Code

public function getCount() {
  return $this->connection
    ->select($this->table, 't')
    ->condition('collection', $this->collection)
    ->countQuery()
    ->execute()
    ->fetchField();
}