src/Database/Migration/Table.php
public function saveData()
    {
        $rows = $this->getData();
        if (empty($rows)) {
            return;
        }

        $bulk = true;
        $row = current($rows);
        $c = array_keys($row);
        foreach ($this->getData() as $row) {
            $k = array_keys($row);
            if ($k != $c) {
                $bulk = false;
                break;
            }
        }

        if ($bulk) {
            $this->getAdapter()->bulkinsert($this, $this->getData());
        } else {
            foreach ($this->getData() as $row) {
                $this->getAdapter()->insert($this, $row);
            }
        }
    }
public function saveData()
    {
        $rows = $this->getData();
        if (empty($rows)) {
            return;
        }

        $bulk = true;
        $row = current($rows);
        $c = array_keys($row);
        foreach ($this->getData() as $row) {
            $k = array_keys($row);
            if ($k != $c) {
                $bulk = false;
                break;
            }
        }

        if ($bulk) {
            $this->getAdapter()->bulkinsert($this, $this->getData());
        } else {
            foreach ($this->getData() as $row) {
                $this->getAdapter()->insert($this, $row);
            }
        }
    }
public function saveData ( ) { $ rows = $ this -> getData ( ) ; if ( empty ( $ rows ) ) { return ; } $ bulk = true ; $ row = current ( $ rows ) ; $ c = array_keys ( $ row ) ; foreach ( $ this -> getData ( ) as $ row ) { $ k = array_keys ( $ row ) ; if ( $ k != $ c ) { $ bulk = false ; break ; } } if ( $ bulk ) { $ this -> getAdapter ( ) -> bulkinsert ( $ this , $ this -> getData ( ) ) ; } else { foreach ( $ this -> getData ( ) as $ row ) { $ this -> getAdapter ( ) -> insert ( $ this , $ row ) ; } } }
Commit the pending data waiting for insertion.

@return void
Commit the pending data waiting for insertion .