esqlate icon indicating copy to clipboard operation
esqlate copied to clipboard

Support for other DB's like SQL Server, MySQL, etc?

Open lemkepf opened this issue 5 years ago • 6 comments

This looks pretty epic and has quite a few use cases. For us specifically - we have a massive legacy SQL Server database. Any thoughts on adding support for that?

lemkepf avatar Jan 17 '20 15:01 lemkepf

I cannot see me writing code to support MS SQL Server (I have no access to a server etc) but I may very well try and support MySQL as well.

The code that interfaces with the database is a really small amount and quite isolated and I'm planning to build a plugin like system (but have done no thinking).

I wonder if I break it apart, write a MySQL plugin and some documentation about how to create a plugin would you be interested in writing a MS SQL plugin?

forbesmyester avatar Jan 18 '20 07:01 forbesmyester

If you can make it a well designed interface it should be pretty easy to plug in SQL Server. SQL Server does have an express edition that is free to use (even runs on linux or docker). It's very similar to MySQL in syntax.

Thanks!

lemkepf avatar Jan 20 '20 02:01 lemkepf

Here's the SQL Server Docker image: https://hub.docker.com/_/microsoft-mssql-server

This is how to launch an SQL Server Developer Edition instance:

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest

SQL Server Developer edition lets developers build any kind of application on top of SQL Server. It includes all the functionality of Enterprise edition, but is licensed for use as a development and test system, not as a production server. SQL Server Developer Edition cannot be used in a production environment.

tomashm avatar Jan 20 '20 10:01 tomashm

On my way to work today I started working on separating out the querying / streaming results parts of the code. Doesn't look like a big job.

It'd be great to know support for MS SQL Server vs MySQL vs Something Else. Do both of you use MS SQL Server and have you tried eSQLate on PostgreSQL to see if it would be the right thing for you to use if it supported MS SQL Server?

forbesmyester avatar Jan 21 '20 08:01 forbesmyester

I've added support for MySQL to Esqlate Server in a branch ( https://github.com/forbesmyester/esqlate-server/tree/feature/multiple-database-support#mysql-support ).

If you wish to use the branch it is relatively easy but you will need to either set up the projects separately using environmental variables or twiddle with the docker-compose file. Happy to support anyone getting this working until I update this repository to support it.

forbesmyester avatar Feb 08 '20 05:02 forbesmyester

MySQL support has officially been released. I will eventually get to SQL Server but it might be a really long time. Contributions are very welcome (and will get credited)

Thanks

forbesmyester avatar Feb 12 '20 07:02 forbesmyester