Search code examples
sql-serverelixirecto

Is there a way to use Ecto with cloud based SQL?


Currently I am making an app where I want to have all the dependancies as orderly as possible. With my app running Elixir on Google's Compute engine, I think, for my (SQL) database, to use the PaaS solution that Google Cloud itself provides.

This being the case, I went looking for an adaptor and unfortunately found none. However, under the impression that SQL is itself a standard, I wonder how hard it might be to use an existing adapter like Ecto.Adapters.Postgres or Ecto.Adapters.SQL with the login information of my platform.

Is this something that is possible, and furthermore what type of protocol is implied by using the predominant adapters? Is it simply a RESTful api or is it something a little more proprietary to postgres?


Solution

  • If you're using Google Cloud SQL (it's unclear from your question) then judging by this documentation and especially this passage:

    "administer your relational MySQL databases on Google Cloud Platform"

    then you should be able to use the MySQL adapter for Ecto. Unless I'm misunderstanding your question and if I am, then please add some detail to your question so we can give you a better answer.

    If you've already researched this option then please provide more detail about what's not working for you.