Comments (4)
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
oravg
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.
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.
Hi.
I Will handle this, after proper testing of the "returning" feature. If I need help, I'll let you know
from sqlpp11.
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)
- Support for pragma tables HOT 1
- sqlite3_step return code 5 with connection pool HOT 2
- how to get a column by string? HOT 2
- how can I use a in where condition,I always get an error? HOT 4
- mingw64, vcpkg, CMake, Project installation cannot find mariadb ? HOT 5
- sqlite connector: execute() silently ignores statements after the first one HOT 7
- how to use binary equal in where HOT 2
- Is there any opentracing support in sqlpp,like jaeger?Will it be supported in the future? HOT 1
- how to fix update exception? HOT 23
- How to retrieve the row count of a query result? HOT 6
- mysql does not seem to support the TIME type HOT 4
- Multiple table query error HOT 3
- Mysql prepared_statement.h missing _bind_time_of_day_parameter function HOT 3
- How do I get record with count of references from one to many? HOT 4
- Handling of `::sqlpp::tag::enforce_null_result_treatment` does not seem to be implemented, NULL documentation is erroneous HOT 11
- scripts/sqlite2cpp.py requires insert of nullable column HOT 6
- [Feedback Requested] Results returning optional, string_view, and span HOT 22
- [requesting assistance] Can the same parameter be used in multiple places in the same prepared statement? HOT 12
- [Need assistance] Common Table Expressions with update HOT 2
- Can't find how to use count(1) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlpp11.