public function set($table, $data, $tablePrefix = null)
{
if (is_array($data)) {
is_null($tablePrefix) && ($tablePrefix = $this->tablePrefix);
$bulk = new BulkWrite();
$insertId = $bulk->insert($data);
$result = $this->runMongoBulkWrite($tablePrefix . $table, $bulk);
Cml::$debug && $this->debugLogSql('BulkWrite INSERT', $tablePrefix . $table, [], $data);
if ($result->getInsertedCount() > 0) {
$this->lastInsertId = sprintf('%s', $insertId);
}
return $this->insertId();
} else {
return false;
}
}