ThinkR-open / bank

Alternative caching backends for `{memoise}` & `{shiny}`.
Other
12 stars 2 forks source link

Add Microsoft SQL Server backend #6

Open ggpinto opened 2 years ago

ggpinto commented 2 years ago

I'll try to understand how and do it myself, as I use it a lot at work. Any tips are welcome :)

ColinFay commented 2 years ago

Hey,

Sure thing! Always happy to receive a PR. My current limitation is that I don't have access to a Microsoft SQL server, so I can't test it myself (hence I haven't explored it yet).

I think that if you follow the pattern in https://github.com/ThinkR-open/bank/blob/main/R/postgres.R, that should do the trick. The cache objects are R6 objects that needs to have the methods you'll find here.

I suppose you could even inherit from cache_postgres if there are some methods that are similar. Something like :

cache_msft_sql <- R6::R6Class(
  "cache_msft_sql",
  inherits = "cache_postgres",
  public = list(

Then only override the methods that are different.

ggpinto commented 2 years ago

I'll use a Docker container with Microsoft SQL Server for exploration an tests and then use our production server for the final tests, thanks for the package and initial tips!