Giter Club home page Giter Club logo

Comments (4)

rbock avatar rbock commented on August 24, 2024

Thanks for the report and the investigation!

Uploaded a patch according to your diff. Please give it a try.

I am surprised that AppVeyor did not catch that? It runs a config with VS2015?

from sqlpp11.

MeanSquaredError avatar MeanSquaredError commented on August 24, 2024

@rbock
Indeed when testing the project with VS 2015, AppVeyor says that the compiler is MSVC 19.0.24241.7 which corresponds to VS 2015.

My guess is that this is somehow related to the fact that AppVeyor tests only the core functionality without the actual database connectors.

Given that the problem is in the templated code which is not instantiated during the test, I think that VS2015 does only limited syntax check of the templated code and only does the proper check when the code is actually instantiated, e.g. when a sqlpp::mysql::connection is created. I think that the lack of proper syntax checking during the initial parsing in VS2015 is wrong, but I obviously this is how things are.

The core test code does have MockDb which is imitates a database connection, but it does not specialize sqlpp::normal_connection, but instead inherits directly from sqlpp::connection, so that is why it did not catch the problem in sqlpp::normal_connection. It is a remnant from the old code before the connection pools, where the connectors inherited directly from sqlpp::connection.

I think the proper fix would be to rework MockDb so that it would specialize sqlpp::normal_connection, just like the real connectors. I remember looking into that a while ago, put postponed it, because it seemed like a fair amount of work and MockDb worked just fine anyway, so it did not seem like an urgent task. I will try to find the time in the next few weeks or so to update MockDb.

from sqlpp11.

roberto-code avatar roberto-code commented on August 24, 2024

Thank you @rbock!
that fixed the issue

from sqlpp11.

rbock avatar rbock commented on August 24, 2024

Thanks for the confirmation.

from sqlpp11.

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.