Coder Social home page Coder Social logo

Comments (7)

igreenfield avatar igreenfield commented on August 17, 2024

Hi @jhalterman do you know why the lib always copy? hence when we use new version of the factory it may have new properties and if we forget to copy this it may be problem....

from lyra.

jhalterman avatar jhalterman commented on August 17, 2024

@igreenfield The thinking was that options are things that help you create a Connection, which cannot be changed once the connection is made, and Config are things that can be changed after the Connection is made. A new version of a connection factory should require a new connection, right?

from lyra.

igreenfield avatar igreenfield commented on August 17, 2024

@jhalterman New Connection yes, but hear you create connection from options the user pass to you... so why you copy it first?
even if you do copy do you need deep copy?

from lyra.

jhalterman avatar jhalterman commented on August 17, 2024

@igreenfield The thinking was I didn't want changes to the Options object to effect future connection attempts which is why we make a copy.

What sort of use case do you have where this is a problem?

from lyra.

igreenfield avatar igreenfield commented on August 17, 2024

@jhalterman The 'ConnectionOptions' object expose the factory so as user I can change it and I will expect that my changes will take effect but with the copy it won't happen...

from lyra.

jhalterman avatar jhalterman commented on August 17, 2024

@igreenfield That's true. You would prefer ConnectionFactory changes to take effect if the connection is ever lost and recovered? In that case, why not make a new connection? As for the current behavior, do you think this could use more clarification in the docs?

from lyra.

igreenfield avatar igreenfield commented on August 17, 2024

@jhalterman If I use the withConnectionFactory option and pass in my factory I would think the lib will use it but in the current implementation the lib will copy part of it and use other instance... this is not so good...

from lyra.

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.