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

Method create

lib/Db/DataloadMapper.php:53–64  ·  view source on GitHub ↗

* create a new dataload * * @NoAdminRequired * @param int $datasetId * @param int $datasourceId * @return integer * @throws \OCP\DB\Exception */

(int $datasetId, int $datasourceId)

Source from the content-addressed store, hash-verified

51 * @throws \OCP\DB\Exception
52 */
53 public function create(int $datasetId, int $datasourceId) {
54 $sql = $this->db->getQueryBuilder();
55 $sql->insert(self::TABLE_NAME)->values([
56 'user_id' => $sql->createNamedParameter($this->userId),
57 'name' => $sql->createNamedParameter('New'),
58 'dataset' => $sql->createNamedParameter($datasetId),
59 'datasource' => $sql->createNamedParameter($datasourceId),
60 'option' => $sql->createNamedParameter('{}'),
61 ]);
62 $sql->executeStatement();
63 return (int)$sql->getLastInsertId();
64 }
65
66 /**
67 * get all data loads for a dataset

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected