- * @param string|array $table Table name or array [schema => table]
- * @param array $param parameter array
- * @param bool $on_duplicate_update Do an update on a duplicate entry
+ * @param string|array $table Table name or array [schema => table]
+ * @param array $param parameter array
+ * @param int $duplicate_mode What to do on a duplicated entry
+ *
+ * @return boolean was the insert successful?
+ * @throws \Exception
+ */
+ public static function insert($table, array $param, int $duplicate_mode = Database::INSERT_DEFAULT)
+ {
+ return DI::dba()->insert($table, $param, $duplicate_mode);
+ }
+
+ /**
+ * Inserts a row with the provided data in the provided table.
+ * If the data corresponds to an existing row through a UNIQUE or PRIMARY index constraints, it updates the row instead.
+ *
+ * @param string|array $table Table name or array [schema => table]
+ * @param array $param parameter array