Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions connections/urls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ mongodb://user:pass@host:27017/mydb?authSource=admin
mongodb://user:pass@host1:27017,host2:27017,host3:27017/mydb?replicaSet=rs0
```

- `uuidRepresentation` sets **Legacy UUID Encoding**.
- **Copy Connection String** writes an SRV connection as `mongodb+srv://` with no port, and every option percent-encoded.

## What the path component means

The part after the host is the database name on most schemes. Seven read it differently:
Expand Down
4 changes: 4 additions & 0 deletions databases/mongodb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ A field whose own name contains a dot, starts with `$` or is `__proto__` is writ

The filter bar's column picker lists paths inside nested objects and arrays of objects, so `customer.country` and `items.sku` filter directly; a row on an array field chooses **any element** or **same element**, which makes one array entry satisfy every row set to it. See [Filtering](/features/filtering#nested-fields). A field name containing a literal dot is left out of the picker, since MongoDB reads a dot as a path separator; reach it with `$getField` inside `$expr`.

On MongoDB 4.2 or later, **Search All Rows** and a **contains**, **starts with** or **ends with** row also match a number, a date, a boolean or an ObjectId by the text the grid shows, so `2024-01-02` finds a date and `42` an integer. An array matches through its strings; search a nested document through its paths in the filter bar. A raw filter row that is not one whole filter document matches no documents.

Rows a query tab returns are read only, whatever the statement. Edit a document from its collection's tab.

The Structure tab lists a collection's indexes, and [renames or removes a field](#renaming-and-removing-fields) across the whole collection. Drop an index from a query tab with `db.users.dropIndex("email_1")`. **New Database** asks for a database name and a first collection, both required. **New View** opens a query tab holding a `db.createView("view_name", "source_collection", [pipeline])` template, and editing a view pre-fills `db.runCommand({"collMod": …})`.

### Views
Expand Down
Loading