Files
sqlchat/README.md
Jorge Thomas - Akrista f9bd62caa0 feat: support for MSSQL database (#33)
* * 📦 chore(package.json): add mssql package
The mssql package has been added to the dependencies list in package.json. This package is required for connecting to Microsoft SQL Server databases.

* *  feat(README.md): add support for MSSQL database
*  feat(CreateConnectionModal.tsx): add support for MSSQL engine type
*  feat(EngineIcon.tsx): add support for MSSQL engine type icon
*  feat(connectors/index.ts): add support for MSSQL engine type connector
MSSQL database is now supported by the application. The CreateConnectionModal component now has an option to select MSSQL as the engine type. The EngineIcon component now has an icon for MSSQL engine type. The connectors/index.ts file now has a connector for MSSQL engine type. The README.md file has been updated to reflect the addition of MSSQL support.

* 🎉 feat(mssql): add support for Microsoft SQL Server
This commit adds a new connector for Microsoft SQL Server. The connector supports the following features:
- Test connection
- Execute statement
- Get databases
- Get tables
- Get table structure

The connector uses the mssql package to connect to the database. The connector is created using a factory function that takes a Connection object as an argument and returns a Connector object.

*  feat(connection.ts): add MSSQL engine and SSL options
The MSSQL engine has been added to the list of supported engines. Additionally, SSL options have been added to the Connection interface, including the ability to enable SSL and trust the server certificate.

* * 🐛 fix(mssql/index.ts): add USE statement to query
The execute and getTableStructure functions were not properly using the specified databaseName. The fix adds a USE statement to the query to ensure that the correct database is used.

* * 🐛 fix(mssql/index.ts): change getTableStructure function to use ConnectionPool instead of Connection
*  feat(mssql/index.ts): improve getTableStructure function to return standard schema string
The getTableStructure function now uses ConnectionPool instead of Connection, which is more efficient. The function has also been improved to return a standard schema string instead of the raw output from sp_help. The schema string is generated by querying the INFORMATION_SCHEMA.COLUMNS table and transforming the results into a standard schema string. This improves the consistency of the schema strings and makes them easier to work with.

* * 🚀 feat(CreateConnectionModal.tsx): add support for SSL encryption for MSSQL connections
* 🐛 fix(mssql/index.ts): fix encrypt option for MSSQL connections
The CreateConnectionModal component now supports SSL encryption for MSSQL connections. A new checkbox has been added to the modal to allow users to enable or disable SSL encryption. The mssql/index.ts file has been updated to fix the encrypt option for MSSQL connections. The encrypt option now uses the `encrypt` property of the `ssl` object instead of the `enabled` property.

* 🐛 fix(connection.ts): rename SSL options properties
The `enabled` and `trustServerCertificate` properties of the `SSLOptions` interface have been renamed to `encrypt` to better reflect their purpose.
2023-04-14 14:19:51 +08:00

2.7 KiB

SQL Chat banner

SQL Chat

vercel

What

SQL Chat is a chat-based SQL client to ask database questions and query databases using natural language.

Screenshot

Screenshot

Why

As we enter the Developer Tools 2.0 era, there is a massive opportunity to rebuild the existing tools using the chat-based interface. SQL Client is no exception. Instead of navigating across many UI controls, a chat-based interface is much more intuitive. Of course, only if that works, and our goal is to deliver that experience.

How

SQL Chat is built by Next.js, it supports the following databases and will add more over time:

  • MySQL
  • PostgreSQL
  • MSSQL

Data Privacy

  • All database connection configs are stored locally in your browser. You can also visit settings to clear the data.

  • Only the database schema will be sent to the OpenAI API. No table data will be sent there.

Local Development

  1. Make a copy of the example environment variables file;

    cp .env.example .env
    
  2. Add your API key and OpenAI API Endpoint(optional) to the newly created .env file;

  3. Install dependencies and start the dev server;

    pnpm i && pnpm dev
    

Star History

Star History Chart

Community

Hang out on Discord

Follow us on Twitter

sqlchat

Sponsors

License

This project is under the BSL License. See the LICENSE file for the full license text.