Use ash_sqlite for mssql and Ecto.Adapter.Tds

This is what I did to use ash_sqlite with mssql and Ecto.Adapter.Tds after asking about mssql in the discord.

1 Like

We should finish the find and replace and publish a new repo for it at some point :slight_smile:

2 Likes

Yes please do. I’m interested in integrating my app to an Oracle Primavera P6 server instantiated on MSSQL and would be very keen to guinea-pig the library.

2 Likes

After reading this post, I don’t know if we should start with AshPostgres or AshSqlite as a base for MSSQL.

It depends TBH. I don’t know much about MSSQL myself. Can it do lateral joins? Is there a function for raising errors (like RAISE EXCEPTION in pg)? Does it do save points? If so, copying postgres would be the best starting point. Otherwise, I’d probably start w/ ash_sqlite.

Sorry to drag this back up, how did you get on with this @user20230119 in the end? I have a business application I would like to attempt porting to Ash that primarily uses Postgres, but has some legacy records in MSSQL that I need to query only, and this seems like a relatively easy fix for me to implement?

I only got as far as forking ash_sqlite and changing the repo adapter.

I had an issue where the ID columns for my tables were int and not bigint that ash_sqlite uses by default.

Someone else got far with ManualRead.