public function setMeta($projectId, $buildId, $key, $value)
    {
        $cols = '`project_id`, `build_id`, `meta_key`, `meta_value`';
        $query = 'REPLACE INTO build_meta ('.$cols.') VALUES (:projectId, :buildId, :key, :value)';

        $stmt = Database::getConnection('read')->prepare($query);
        $stmt->bindValue(':key', $key, \PDO::PARAM_STR);
        $stmt->bindValue(':projectId', (int)$projectId, \PDO::PARAM_INT);
        $stmt->bindValue(':buildId', (int)$buildId, \PDO::PARAM_INT);
        $stmt->bindValue(':value', $value, \PDO::PARAM_STR);

        if ($stmt->execute()) {
            return true;
        } else {
            return false;
        }
    }
public function setMeta($projectId, $buildId, $key, $value)
    {
        $cols = '`project_id`, `build_id`, `meta_key`, `meta_value`';
        $query = 'REPLACE INTO build_meta ('.$cols.') VALUES (:projectId, :buildId, :key, :value)';

        $stmt = Database::getConnection('read')->prepare($query);
        $stmt->bindValue(':key', $key, \PDO::PARAM_STR);
        $stmt->bindValue(':projectId', (int)$projectId, \PDO::PARAM_INT);
        $stmt->bindValue(':buildId', (int)$buildId, \PDO::PARAM_INT);
        $stmt->bindValue(':value', $value, \PDO::PARAM_STR);

        if ($stmt->execute()) {
            return true;
        } else {
            return false;
        }
    }
public function setMeta ( $ projectId , $ buildId , $ key , $ value ) { $ cols = '`project_id`, `build_id`, `meta_key`, `meta_value`' ; $ query = 'REPLACE INTO build_meta (' . $ cols . ') VALUES (:projectId, :buildId, :key, :value)' ; $ stmt = Database :: getConnection ( 'read' ) -> prepare ( $ query ) ; $ stmt -> bindValue ( ':key' , $ key , \ PDO :: PARAM_STR ) ; $ stmt -> bindValue ( ':projectId' , ( int ) $ projectId , \ PDO :: PARAM_INT ) ; $ stmt -> bindValue ( ':buildId' , ( int ) $ buildId , \ PDO :: PARAM_INT ) ; $ stmt -> bindValue ( ':value' , $ value , \ PDO :: PARAM_STR ) ; if ( $ stmt -> execute ( ) ) { return true ; } else { return false ; } }
Set a metadata value for a given project and build ID.
@param $projectId
@param $buildId
@param $key
@param $value
@return bool
Set a metadata value for a given project and build ID .