+
+ /**
+ * Update rows in the gserver table.
+ * Enforces gserver table field maximum sizes to avoid "Data too long" database errors
+ *
+ * @param array $fields
+ * @param array $condition
+ *
+ * @return bool
+ *
+ * @throws Exception
+ */
+ public static function update(array $fields, array $condition): bool
+ {
+ $fields = DI::dbaDefinition()->truncateFieldsForTable('gserver', $fields);
+
+ return DBA::update('gserver', $fields, $condition);
+ }
+
+ /**
+ * Insert a row into the gserver table.
+ * Enforces gserver table field maximum sizes to avoid "Data too long" database errors
+ *
+ * @param array $fields
+ * @param int $duplicate_mode What to do on a duplicated entry
+ *
+ * @return bool
+ *
+ * @throws Exception
+ */
+ public static function insert(array $fields, int $duplicate_mode = Database::INSERT_DEFAULT): bool
+ {
+ $fields = DI::dbaDefinition()->truncateFieldsForTable('gserver', $fields);
+
+ return DBA::insert('gserver', $fields, $duplicate_mode);
+ }