Coder Social home page Coder Social logo

Comments (9)

danecando avatar danecando commented on June 14, 2024

I'm not sure. I need to make some updates to the plugin I'll look into this

from hapi-sequelize.

Nargonath avatar Nargonath commented on June 14, 2024

Alright. Feel free to ask if you need some help. ;) I'll be happy to help if there is anything I can do.

from hapi-sequelize.

danecando avatar danecando commented on June 14, 2024

sequelize/sequelize#5645

from hapi-sequelize.

Nargonath avatar Nargonath commented on June 14, 2024

Thanks for the link. I'll try to summarize what are the options in order to achieve what we want:

  1. Use an in-memory SQLite database (doesn't remove the need of a database connection but speed up the communication).
  2. Mocking sequelize.query() to return a promise.

As of these 2 options, I don't think there is something we can do in relation to your plugin, or at least I don't see what. Is your "enhancement" label still relevant? Did you have something in mind?

If there is something you wish to implement I'll be happy to help.

from hapi-sequelize.

danecando avatar danecando commented on June 14, 2024

@Nargonath I think it's going to be more of a sequelize specific issue. I'm about update the plugin so that it's only job is hooking up your sequelize instances to hapi and sync'ing up models. Plugin options will accept an array of sequelize instance(s) and a couple options like model paths. Seems unnecessary to handle creating the instances in the plugin like it does right now.

from hapi-sequelize.

Nargonath avatar Nargonath commented on June 14, 2024

I haven't forgotten about this issue, I just don't have the time atm to get into it but I hope I will soon. :)

from hapi-sequelize.

danecando avatar danecando commented on June 14, 2024

@Nargonath I just pushed an initial rewrite to the v3 branch. Will need some love and updates but I think we can make it work. Going to start fixing it up a bit and writing tests soon. Any suggestions welcome.

from hapi-sequelize.

danecando avatar danecando commented on June 14, 2024

Maybe we can switch the tests over to sqlite instead of mysql to make this easier?

from hapi-sequelize.

Nargonath avatar Nargonath commented on June 14, 2024

Hey sorry for not being active as I wanted to. The last months have been pretty harsh on me and I didn't have the time for OSS as I wished.

I haven't really dived into your v3 rewrite but, if we can't free ourselves from an actual database, sqlite seems a good option. I saw that you moved the sequelize instanciation out of your plugin. Perhaps there is a way we could mock up sequelize instance now so we wouldn't actually require a real database for the tests. I remember reading something about it somewhere. I'll see if I can find it back. Not sure if you were talking about your own module's tests or people's tests using your module though.

from hapi-sequelize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.