Chat

The Chat feature in DBCode enables interactive communication with your database directly in Visual Studio Code. Use natural language to generate queries to retrieve, and edit data effortlessly, enhancing productivity and simplifying database management.

Prerequisites

  • GitHub Copilot Extension and Subscription:

    • To use the Chat feature, you must install the GitHub Copilot extension from the Visual Studio Code Marketplace.
    • A valid GitHub Copilot subscription is required for the Chat feature to function.
  • Alternative Option:

    • If you don’t have a GitHub Copilot subscription, you can still utilize DBCode’s Inline Completion feature for real-time query suggestions and completion directly in the editor. For detailed information , check out the Inline Completion

Accessing the Chat Feature

  1. Open DBCode in Visual Studio Code:

    • Start Visual Studio Code and click the DBCode icon in the Activity Bar on the left.

    dbcode icon

  2. Select a Database Table:

    • Browse the Connections pane, then select a database table to view its data in the main editor window.

    selected table

  3. Open the Chat Panel:

    • Click the Chat icon, typically displayed as a text bubble on the right side of the table view, to launch the Chat panel.

    open chat

Using the Chat Feature

  1. Submit Queries or Commands:

    • Type your questions or commands into the chat box at the bottom of the Chat panel, prefixed with @dbcode.

    • Use natural language (e.g., “Show me all customers who purchased in the last month”) to ask a question.

    chat box

  2. View Query Results:

    • Query responses are displayed directly in the Chat panel, allowing you to review results without switching contexts.

    result

  3. Copy SQL Queries from Chat:

    • For each response, click the Copy icon to extract the auto-generated SQL query for use elsewhere.

    copy result

  4. Use Copied Queries:

    • Paste the copied SQL query into an SQL file or DBCode notebook connected to your database to execute and analyze the query.

    • When done, close the Chat panel or leave it open for ongoing interactions.

Benefits of the Chat Feature

  • Streamlined Workflow: Query and retrieve data without leaving Visual Studio Code.

  • Natural Language Support: Easily interact with your database using plain language.

  • Time-Saving: Generate and reuse SQL queries effortlessly.

  • Flexible Options: Use the Chat feature with GitHub Copilot or rely on Inline Completion if Copilot isn’t available.

DBCode’s Chat feature enhances database management with an intuitive, user-friendly interface for SQL and natural language queries. Whether you’re a developer, analyst, or database administrator, this tool streamlines interactions and improves productivity.