Skip to content

MongoDB ?! #2544

Closed
Closed

Description

@aminwhat

Hi there, will any other database besides Postgres be added, maybe MongoDB?!

Activity

  1. lukehutch commented on Jul 28, 2024

    @lukehutch
    Contributor

    (Another Serverpod user here...) The query DSL is hardcoded for generating Postgres-style SQL, and it would take a lot of work to make it work for an entirely different database type like MongoDB. however, the SerializableModel subclasses are very easy to convert to and from JSON, so you could use the MongoDB API directly with those classes. It would be a very simple fit. Then you could just use the MongoDB API directly.

    You would need to change your Dockerfile to start a MongoDB instance. And all the Google Cloud Terraform scripts assume that you'll be using Serverpod with Postgres (Cloud SQL in Google terms), so if you wanted to run on Google Cloud, you'd have to do a fair bit of work to modify these scripts too. (Google Cloud doesn't have a MongoDB service, that I have seen, so you'd have to just run your own instance on Compute Engine.)

  2. SandPod commented on Aug 5, 2024

    @SandPod
    Contributor

    That is a great suggestion for a workaround @lukehutch!

    I'm closing this as a duplication of #14 but will post your suggested workaround in that issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions