Skip to content

When executing multi-line queries on the MongoDB database, an error occurs #848

@amisadmin

Description

@amisadmin

Bug Description

When executing multi-line queries on the MongoDB database, an error occurs: Unexpected end of input. For example:

db.product.aggregate([
  { 
    $match: { "status": "ARCHIVED"} 
  } 
])

Environment

  • DBCode version: 1.19.1
  • VS Code (or fork) version:
  • OS: win
  • Database: mongodb
  • Connection: direct

Error Meesages (if applicable)

Unexpected end of input

Logs

If available, paste relevant logs from the Output panel (View > Output > DBCode).

2025-11-21 12:42:34.305 [error] 'mongodb': Unexpected end of input;
2025-11-21 12:42:42.253 [error] SQL formatting failed: Error: Parse error: Unexpected "[
  { 
   " at line 2 column 30.
This likely happens because you're using the default "sql" dialect.
If possible, please select a more specific dialect (like sqlite, postgresql, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions