public function insertBatchStream(string $tableName, array $columns = [], string $format = 'CSV')
    {
        if ($this->getCountPendingQueue() > 0) {
            throw new QueryException('Queue must be empty, before insertBatch, need executeAsync');
        }

        if (! in_array($format, self::SUPPORTED_FORMATS, true)) {
            throw new QueryException('Format not support in insertBatchFiles');
        }

        if (empty($columns)) {
            $sql = 'INSERT INTO ' . $tableName . ' FORMAT ' . $format;
        } else {
            $sql = 'INSERT INTO ' . $tableName . ' ( ' . implode(',', $columns) . ' ) FORMAT ' . $format;
        }

        return $this->transport()->writeStreamData($sql);
    }
public function insertBatchStream(string $tableName, array $columns = [], string $format = 'CSV')
    {
        if ($this->getCountPendingQueue() > 0) {
            throw new QueryException('Queue must be empty, before insertBatch, need executeAsync');
        }

        if (! in_array($format, self::SUPPORTED_FORMATS, true)) {
            throw new QueryException('Format not support in insertBatchFiles');
        }

        if (empty($columns)) {
            $sql = 'INSERT INTO ' . $tableName . ' FORMAT ' . $format;
        } else {
            $sql = 'INSERT INTO ' . $tableName . ' ( ' . implode(',', $columns) . ' ) FORMAT ' . $format;
        }

        return $this->transport()->writeStreamData($sql);
    }
public function insertBatchStream ( string $ tableName , array $ columns = [ ] , string $ format = 'CSV' ) { if ( $ this -> getCountPendingQueue ( ) > 0 ) { throw new QueryException ( 'Queue must be empty, before insertBatch, need executeAsync' ) ; } if ( ! in_array ( $ format , self :: SUPPORTED_FORMATS , true ) ) { throw new QueryException ( 'Format not support in insertBatchFiles' ) ; } if ( empty ( $ columns ) ) { $ sql = 'INSERT INTO ' . $ tableName . ' FORMAT ' . $ format ; } else { $ sql = 'INSERT INTO ' . $ tableName . ' ( ' . implode ( ',' , $ columns ) . ' ) FORMAT ' . $ format ; } return $ this -> transport ( ) -> writeStreamData ( $ sql ) ; }
insert Batch Stream

@param string[] $columns
@param string   $format ['TabSeparated','TabSeparatedWithNames','CSV','CSVWithNames']
@return Transport\CurlerRequest
insert Batch Stream