Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does graphula support persistent-mongoDB? #52

Open
codygman opened this issue Dec 7, 2020 · 2 comments
Open

Does graphula support persistent-mongoDB? #52

codygman opened this issue Dec 7, 2020 · 2 comments

Comments

@codygman
Copy link

codygman commented Dec 7, 2020

I think the answer is no. I ran into this error:

/home/cody/smurf/test/ITProTV/Database/Particle/Models/HostSpec.hs:49:27-51: error:
    • Couldn't match type ‘Database.MongoDB.Query.MongoContext’
                     with ‘Database.Persist.Sql.Types.Internal.SqlBackend’
        arising from a use of ‘node’
    • In a stmt of a 'do' block:
        Entity _ hostVal <- node @Host.Host () mempty
      In the second argument of ‘($)’, namely
        ‘do Entity _ hostVal <- node @Host.Host () mempty
            Host.hostBio hostVal
              `Test.shouldBe` Just (Gluon.HostBio "Some Texan.")’
      In a stmt of a 'do' block:
        runGraphulaT Nothing _runDB
          $ do Entity _ hostVal <- node @Host.Host () mempty
               Host.hostBio hostVal
                 `Test.shouldBe` Just (Gluon.HostBio "Some Texan.")

I'm assuming this means that you must be using the SqlBackend which persistent-mongoDB does not use.

Any way to make this work, ideas on how feasible implementing it is, etc?

@eborden
Copy link
Contributor

eborden commented Dec 7, 2020

Yes, it is currently bound to SqlBackend, though I'm not sure if that is from convenience or necessity. @cdparks do you see a viable path to abstracting persistent backends away and removing the dependence on SqlBackend?

@cdparks
Copy link
Contributor

cdparks commented Dec 7, 2020

@eborden there's a few layers of abstraction around what a "backend" is in persistent, so I suspect this is possible, but I'll need to study it

@pbrisbin pbrisbin moved this to To do in Open Source Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👜 To do
Development

No branches or pull requests

3 participants