private function createTableSelection($table, $relatedKeys = null) { $selection = $this->connection->select('%n.*', $table)->from('%n', $table); return $relatedKeys !== null ? $selection->setRelatedKeys($relatedKeys) : $selection; }