6 Commits

Author SHA1 Message Date
40e86fbdaf fix: too many connect error (#71)
* add fetch all struct

* add other database implement

* rename method name

* adjust the order of functions

* eslint

* eslint

* eslint

* eslint

* eslint

* fix error end when fetch schema batch
2023-05-04 23:36:48 +08:00
ea7a48a26b chore: use prettier for project and apply to all files 2023-04-29 22:49:07 +08:00
0471e40684 feat: optimize fetch database schema (#65) 2023-04-24 23:11:32 +08:00
14f86897d6 feat: support run non-select SQL (#35) 2023-04-14 15:54:22 +08:00
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
861a22f13d refactor: move codes into src folder 2023-03-31 16:12:09 +08:00