getConnection()->selectFromWriteConnection($sql, $values)[0]; $sequence = $sequence ?: 'id'; $id = is_object($result) ? $result->{$sequence} : $result[$sequence]; return is_numeric($id) ? (int) $id : $id; } /** * Process the results of a column listing query. * * @param array $results * @return array */ public function processColumnListing($results) { return array_map(function ($result) { return ((object) $result)->column_name; }, $results); } }