Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 17:52
· 30 commits to master since this release
5c3f412

What's Changed

Added

  • Query editor autocomplete — press Ctrl+Space or choose Query → Autocomplete
    for database, collection and field names, including dotted paths through nested objects
    and arrays of documents.
  • Database selection — completing db. lists databases and inserts
    db.getSiblingDB("…"); collections can then be selected after the next dot and are
    inserted through getCollection("…"), including names that overlap with shell methods.
  • Method completion — db.get suggests getSiblingDB and getCollection; collections
    offer find, findOne, countDocuments and estimatedDocumentCount. Supported cursor
    chains offer limit, skip, sort, toArray and count after find(...) and limit(...).
    Method suggestions open automatically while typing a prefix or a dot after a supported call
    and require no database request.
  • Completion controls — filter suggestions while typing, choose with ↑ / ↓, insert
    with Enter / Tab, and dismiss or cancel loading with Esc. Method completion inserts
    parentheses and places the caret inside arguments, preserving existing call arguments
    when correcting a method name.

Changed

  • Collection fields are sampled from up to 20 documents, with nested paths up to eight levels.
    The field cache is scoped to the connection, database and collection, expires after one
    minute, and is cleared by F9 or running a query.

Fixed

  • Query execution now selects the tab's database before every run, so
    db.getCollection(...).find({}).toArray() works without an explicit getSiblingDB(...).
    Explicit database selection in the script still takes precedence; tabs without a selected
    database retain the connection's default database.
  • Completion replaces the entire name when the caret is inside a token, correctly handling
    escaped quotes, backslashes and Unicode escapes while preserving the surrounding query.
  • Pending completion requests are cancelled and stale suggestions discarded when editing,
    changing focus, switching or closing tabs, refreshing, or disconnecting.

Full Changelog: v0.3.0...v0.4.0