Code Monkey home page Code Monkey logo

Comments (6)

jchrys avatar jchrys commented on May 18, 2024 1

You're absolutely right. There is no need to implement the Wrapped interface for MySqlConnection and MySqlConnectionFactory, as they are not wrappers. If, however, we come across a class that wraps an r2dbc-spi implementation, it would be advisable to implement Wrapped in that case.

from r2dbc-mysql.

svats0001 avatar svats0001 commented on May 18, 2024

Hi @jchrys,

Do these interfaces need to be implemented anywhere or do they just need to be created? I think MySqlConnection has to implement Lifecycle. I don't think Wrapped needs to be implemented anywhere, it's up to the end user. Closeable might have to be implemented by MySqlConnectionFactory etc.

from r2dbc-mysql.

mirromutth avatar mirromutth commented on May 18, 2024

The MySqlConnection should to do nothing in postAllocate, only contains one job in preRelease, which is to rollback if it is in a transaction.

Which means postAllocate will return an empty Mono, and preRelease will be an alias as rollbackTransaction.

from r2dbc-mysql.

mirromutth avatar mirromutth commented on May 18, 2024

Hmmm, I noticed that the COM_RESET_CONNECTION command, which should be more suitable as preRelease, it resets almost all state, including temporary tables, transactions, etc.

from r2dbc-mysql.

mirromutth avatar mirromutth commented on May 18, 2024

Forget it, it turns out that COM_RESET_CONNECTION is not a good solution.

This command not being supported in 5.6.x and below, it will also cause all prepared statements to be cleared.

from r2dbc-mysql.

jchrys avatar jchrys commented on May 18, 2024

#171 #175

from r2dbc-mysql.

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.