MCPcopy Create free account
hub / github.com/Rello/analytics / getColumns

Method getColumns

lib/Db/FlexibleStorageMapper.php:38–50  ·  view source on GitHub ↗

@return list > */

(int $datasetId)

Source from the content-addressed store, hash-verified

36
37 /** @return list<array<string,mixed>> */
38 public function getColumns(int $datasetId): array {
39 $sql = $this->db->getQueryBuilder();
40 $sql->select('*')
41 ->from(self::COLUMN_TABLE)
42 ->where($sql->expr()->eq('dataset_id', $sql->createNamedParameter($datasetId, IQueryBuilder::PARAM_INT)))
43 ->orderBy('display_position', 'ASC')
44 ->addOrderBy('id', 'ASC');
45 $result = $sql->executeQuery();
46 $rows = $result->fetchAll();
47 $result->closeCursor();
48
49 return array_map([$this, 'columnDescriptor'], is_array($rows) ? $rows : []);
50 }
51
52 /** @param array<string,mixed> $column */
53 public function createColumn(int $datasetId, array $column): array {

Callers 10

createMethod · 0.80
getDescriptorMethod · 0.80
updateSchemaMethod · 0.80
queryMethod · 0.80
queryForReportMethod · 0.80
deleteWithFilterMethod · 0.80
exportDatasetMethod · 0.80
prepareRecordsMethod · 0.80
mapSourceRowsMethod · 0.80

Calls 1

eqMethod · 0.80

Tested by

no test coverage detected