src/Mysql.php
public function save() : bool
    {
        if (!$this->isTableNameSet()) {
            return false;
        }
        $pkName = $this->primaryKey;
        if ((int) $this->$pkName > 0) {
            $this->updateEntry();
        } else {
            $this->createEntry();
        }
        return true;
    }
public function save() : bool
    {
        if (!$this->isTableNameSet()) {
            return false;
        }
        $pkName = $this->primaryKey;
        if ((int) $this->$pkName > 0) {
            $this->updateEntry();
        } else {
            $this->createEntry();
        }
        return true;
    }
public function save ( ) : bool { if ( ! $ this -> isTableNameSet ( ) ) { return false ; } $ pkName = $ this -> primaryKey ; if ( ( int ) $ this -> $ pkName > 0 ) { $ this -> updateEntry ( ) ; } else { $ this -> createEntry ( ) ; } return true ; }
Save if new, update if primary key isset
@return bool
Save if new update if primary key isset