Query Editor
Master the IntelliShell query editor for writing and executing MongoDB queries.
Overview
The IntelliShell query editor is the heart of Sutido. It's a powerful, context-aware editor built on Monaco (the same editor that powers VS Code) with MongoDB-specific enhancements.
Writing Queries
Write MongoDB queries using standard JavaScript syntax. The editor supports all MongoDB collection methods:
Read Operations
// Find documents
db.users.find({ status: "active" })
// Find with projection
db.users.find(
{ status: "active" },
{ name: 1, email: 1, _id: 0 }
)
// Find one document
db.users.findOne({ _id: ObjectId("...") })
// Count documents
db.users.countDocuments({ status: "active" })
// Estimated count (faster, no filter)
db.users.estimatedDocumentCount() Write Operations
// Insert one
db.users.insertOne({ name: "John", email: "john@example.com" })
// Insert many
db.users.insertMany([
{ name: "John" },
{ name: "Jane" }
])
// Update one
db.users.updateOne(
{ email: "john@example.com" },
{ $set: { status: "verified" } }
)
// Update many
db.users.updateMany(
{ status: "pending" },
{ $set: { status: "active" } }
)
// Delete
db.users.deleteOne({ _id: ObjectId("...") })
db.users.deleteMany({ status: "deleted" }) IntelliShell Autocomplete
Sutido's autocomplete goes beyond standard MongoDB methods. It learns from your data:
Field Suggestions
When you start typing inside a query, Sutido samples documents from your collection and
suggests actual field names. It extracts fields up to three levels deep, so nested paths
like address.city or orders.items.productId are suggested automatically.
Method Suggestions
After db., you'll see database methods like:
getCollection()listCollections()stats()runCommand()createCollection()dropDatabase()
After db.collection., you'll see collection methods with parameter hints.
Tip: Press Ctrl+Space to manually trigger autocomplete at any time.
Multiple Statements
Write multiple queries in the same editor. Sutido parses statements intelligently, handling comments and string literals correctly.
// First query
db.users.find({ status: "active" })
// Second query - runs separately
db.orders.find({ userId: "abc123" })
// Switching databases
use("analytics")
db.events.find({ type: "pageview" }) Execution Options
Run Selection (Ctrl+Enter)
Select specific code and press Ctrl+Enter to run only that selection.
If nothing is selected, runs the statement at the cursor.
Run All (F5)
Execute all statements in the editor sequentially. Results from each statement are displayed.
Run Statement (F6)
Run only the statement where your cursor is positioned, without needing to select it.
Query Options
Default Limit
By default, Sutido limits query results to 50 documents to prevent overwhelming the interface. You can override this in your query:
// Fetch more results
db.users.find({}).limit(1000)
// Fetch all (use carefully!)
db.users.find({}).limit(0) Response Size Limit
Results are capped at 2 MB per request to maintain performance. For large documents, consider using projection to limit returned fields.
Timeout
Queries timeout after 120 seconds. Long-running queries can be aborted using the Stop button in the toolbar.
AI Query Generation
Describe what you want in plain English, and Sutido generates the MongoDB query for you. See Settings to configure your AI provider (OpenAI, Gemini, or Claude).
Next Steps
Learn about viewing results in the Document Viewer.