src/snac/server/database/SQL.php
/**
     * Insert (or update) a name
     *
     * Language and contributors are related table on name.id, and the calling code is smart enough to call
     * those insert functions for this name's language and contributors. Our concern here is tightly focused
     * on writing to table name. Nothing else.
     *
     * @param string[] $vhInfo associative list with keys: version, ic_id
     *
     * @param string $original The original name string
     *
     * @param float $preferenceScore The preference score for ranking this as the preferred name. This
     * concept may not work in a culturally diverse environment
     *
     * @param integer $nameID A table id. If null we assume this is a new record an mint a new record version
     * from selectID().
     *
     */
Insert (or update) a name
Language and contributors are related table on name.id, and the calling code is smart enough to call
those insert functions for this name's language and contributors. Our concern here is tightly focused
on writing to table name. Nothing else.

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

@param string $original The original name string

@param float $preferenceScore The preference score for ranking this as the preferred name. This
concept may not work in a culturally diverse environment

@param integer $nameID A table id. If null we assume this is a new record an mint a new record version
from selectID().
Insert ( or update ) a name Language and contributors are related table on name . id and the calling code is smart enough to call those insert functions for this name ' s language and contributors . Our concern here is tightly focused on writing to table name . Nothing else . @param string [] $vhInfo associative list with keys : version ic_id @param string $original The original name string @param float $preferenceScore The preference score for ranking this as the preferred name . This concept may not work in a culturally diverse environment @param integer $nameID A table id . If null we assume this is a new record an mint a new record version from selectID () .
public function insertName($vhInfo,
                               $original,
                               $preferenceScore,
                               $nameID)
    {
        if (! $nameID)
        {
            $nameID = $this->selectID();
        }
        $qq_1 = 'insert_name';
        $this->sdb->prepare($qq_1,
                            'insert into name
                            (version, ic_id, original, preference_score, id)
                            values
                            ($1, $2, $3, $4, $5)');
        $result = $this->sdb->execute($qq_1,
                                      array($vhInfo['version'],
                                            $vhInfo['ic_id'],
                                            $original,
                                            $preferenceScore,
                                            $nameID));
        $this->sdb->deallocate($qq_1);
        return $nameID;
    }
public function insertName ( $ vhInfo , $ original , $ preferenceScore , $ nameID ) { if ( ! $ nameID ) { $ nameID = $ this -> selectID ( ) ; } $ qq_1 = 'insert_name' ; $ this -> sdb -> prepare ( $ qq_1 , 'insert into name
                            (version, ic_id, original, preference_score, id)
                            values
                            ($1, $2, $3, $4, $5)' ) ; $ result = $ this -> sdb -> execute ( $ qq_1 , array ( $ vhInfo [ 'version' ] , $ vhInfo [ 'ic_id' ] , $ original , $ preferenceScore , $ nameID ) ) ; $ this -> sdb -> deallocate ( $ qq_1 ) ; return $ nameID ; }
Insert (or update) a name
 Language and contributors are related table on name.id, and the calling code is smart enough to call
 those insert functions for this name's language and contributors.
Insert ( or update ) a name Language and contributors are related table on name . id and the calling code is smart enough to call those insert functions for this name ' s language and contributors .