Giter Club home page Giter Club logo

Comments (4)

rbock avatar rbock commented on July 3, 2024

Hi,

Letting this sink in for a while, it does not seem to be too complicated after all:

Lets say that aggregate expressions are either

  • calls to aggregate functions like count or avg or
  • group by expressions or
  • combinations of aggregate expressions

Then

  • combining aggregate expressions and non-aggregate expressions (e.g. myAggregate + myNonAggregate) is not allowed
  • either all result columns have to be aggregate expressions or all result columns have to be non-aggregate expressions.

Since aggregate functions are known via their tag types, and group by can yield a set of expressions, this should not be too difficult to check.

If a database (like MySQL) supports mixing aggregate and non-aggregate columns, then this can be supported by the connector of that database offering something like sqlpp::mysql::pseudo_aggregate (better name, anyone?), a no-op function that just marks a column as aggregate.

Best,

Roland

from sqlpp11.

rbock avatar rbock commented on July 3, 2024

This should be fixed by now in the develop branch. The develop branch requires a minor change in the connector libraries as well. See the latest changes to connection.h in the sqlite3 connector. Let me know if you need help adjusting the postgresql connector.

from sqlpp11.

cszawisza avatar cszawisza commented on July 3, 2024

Hi.
I Will handle this, after proper testing of the "returning" feature. If I need help, I'll let you know

from sqlpp11.

rbock avatar rbock commented on July 3, 2024

As far as I can tell, this is fixed in release-0.35.

It was not trivial, though. Please let me know if I missed something.

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.