fluent-kit icon indicating copy to clipboard operation
fluent-kit copied to clipboard

SQLServer driver

Open richgabrielli opened this issue 6 years ago • 16 comments

Any thoughts / ambitions on creating connectivity to Microsoft SQL Server?

richgabrielli avatar May 05 '18 20:05 richgabrielli

I would love to support this. Just not sure how to go about it. Ideally we would create a native protocol client using SwiftNIO so that we can take advantage of non-blocking IO. Or, if MSSQL already has a non-blocking C lib we could use that would be great as well.

tanner0101 avatar May 15 '18 23:05 tanner0101

I would very much be willing to help on this. I wish my skills we advanced enough to take a lead, but I will def be willing to be a gopher.

richgabrielli avatar May 16 '18 18:05 richgabrielli

First step would be:

  • researching if MSSQL documents their wire protocol
  • or if they already have a non-blocking (very important that it be non-blocking) C library.

tanner0101 avatar May 16 '18 18:05 tanner0101

I found this, but I am not sure if it is what you are looking for: https://msdn.microsoft.com/en-us/library/cc425493(v=exchg.80).aspx

richgabrielli avatar May 16 '18 18:05 richgabrielli

This is more specific to SQL Server. First one may not be a good link: https://msdn.microsoft.com/en-us/library/ee210043(v=sql.105).aspx

richgabrielli avatar May 16 '18 19:05 richgabrielli

The only C driver library I'm aware of is freetds. I played around with it months ago and it was a massive pain to interact with from Swift, I gave up pretty soon.

The protocol it implements is documented here: MS-TDS

vzsg avatar May 16 '18 20:05 vzsg

Going with the assumption that there is no viable C driver, Are the document links in any way helpful to get started or they not what you were looking for?

richgabrielli avatar May 17 '18 14:05 richgabrielli

After digging around MSFT's technical documents, I think I found the actual wire protocol definition: https://sqlprotocoldoc.blob.core.windows.net/productionsqlarchives/MS-SSTDS/[MS-SSTDS].pdf

Any work to support this is probably going to go through the Swift Server Working Group before being implemented for Vapor.

Mordil avatar Feb 10 '19 20:02 Mordil

Agreed. Linking the forum pitch here for reference: https://forums.swift.org/t/sql-server-driver/20327

tanner0101 avatar Feb 12 '19 19:02 tanner0101

I am going to raise my hand again for SQL Server. It is one of the most widely used databases in the enterprise.

richgabrielli avatar Feb 13 '19 13:02 richgabrielli

I have made a start at - http://www.binaryrefinery.com

richardpauljones avatar Mar 27 '19 20:03 richardpauljones

Is there any updates to this? Would love to have MSSQL support in Vapor

Nash0x7E2 avatar Apr 21 '20 18:04 Nash0x7E2

This has been pitched to the SSWG, and there's been some traffic on it.

Further tracking should be done via the Swift on Server Working Group forums at https://forums.swift.org/t/sql-server-driver/20327/.

Once a SQL Server driver has been authored, then Vapor will be able to write a Fluent driver to work with it.

Mordil avatar Apr 21 '20 19:04 Mordil

Noted, thank you. New to vapor so looking forward to contributing where possible :)

Nash0x7E2 avatar Apr 21 '20 19:04 Nash0x7E2

Any update on this?

thejdah avatar Oct 27 '22 21:10 thejdah

@thejdah Nope, essentially waiting for someone in the community to build a driver. It's not on the Vapor roadmap

0xTim avatar Oct 27 '22 23:10 0xTim