src/snac/server/database/SQL.php
/**
     * New insert into version_history
     *
     * We already know the version_history.version, and ic_id, so we are not relying on the default
     * values. This all happens because we are using the same ic_id across an entire constellation. And we
     * might be using the same version across many Constellations and other inserts all in this current
     * session.
     *
     * @param string[] $vhInfo associative list with keys: version, ic_id
     *
     * @param integer $appUserID User id
     *
     * @param integer $roleID Role id
     *
     * @param string $status Constellation status
     *
     * @param string $note Note for this version
     *
     * @return string[] $vhInfo associative list with keys: version, ic_id
     *
     */
New insert into version_history
We already know the version_history.version, and ic_id, so we are not relying on the default
values. This all happens because we are using the same ic_id across an entire constellation. And we
might be using the same version across many Constellations and other inserts all in this current
session.

@param string[] $vhInfo associative list with keys: version, ic_id

@param integer $appUserID User id

@param integer $roleID Role id

@param string $status Constellation status

@param string $note Note for this version

@return string[] $vhInfo associative list with keys: version, ic_id
New insert into version_history We already know the version_history . version and ic_id so we are not relying on the default values . This all happens because we are using the same ic_id across an entire constellation . And we might be using the same version across many Constellations and other inserts all in this current session . @param string [] $vhInfo associative list with keys : version ic_id @param integer $appUserID User id @param integer $roleID Role id @param string $status Constellation status @param string $note Note for this version @return string [] $vhInfo associative list with keys : version ic_id
public function insertIntoVH($vhInfo, $appUserID, $roleID, $status, $note)
    {
        $qq = 'insert_into_version_history';
        $this->sdb->prepare($qq,
                            'insert into version_history
                            (version, id, user_id, role_id, status, is_current, note)
                            values
                            ($1, $2, $3, $4, $5, $6, $7)
                            returning version, id as ic_id;');
        $result = $this->sdb->execute($qq,
                                      array($vhInfo['version'], $vhInfo['ic_id'], $appUserID, $roleID, $status, true, $note));
        $vhInfo = $this->sdb->fetchrow($result);
        $this->sdb->deallocate($qq);
        return $vhInfo;
    }
public function insertIntoVH ( $ vhInfo , $ appUserID , $ roleID , $ status , $ note ) { $ qq = 'insert_into_version_history' ; $ this -> sdb -> prepare ( $ qq , 'insert into version_history
                            (version, id, user_id, role_id, status, is_current, note)
                            values
                            ($1, $2, $3, $4, $5, $6, $7)
                            returning version, id as ic_id;' ) ; $ result = $ this -> sdb -> execute ( $ qq , array ( $ vhInfo [ 'version' ] , $ vhInfo [ 'ic_id' ] , $ appUserID , $ roleID , $ status , true , $ note ) ) ; $ vhInfo = $ this -> sdb -> fetchrow ( $ result ) ; $ this -> sdb -> deallocate ( $ qq ) ; return $ vhInfo ; }
New insert into version_history
 We already know the version_history.version, and ic_id, so we are not relying on the default
 values.
New insert into version_history We already know the version_history . version and ic_id so we are not relying on the default values .