[odb-users] Raw SQL statement
Boris Kolpackov
boris at codesynthesis.com
Mon Dec 8 06:49:36 EST 2014
Hi Adnan,
Adnan RIHAN <axel50397 at gmail.com> writes:
> Thats what I saw in the documentation. I thought there was a way to
> query arbitrary queries without creating structures/classes.
There is, called database::execute(). But if your query needs to
return something other than the row count, then you have to use
a view which extracts the returned data into a struct. As my
second example shows, you can have a single struct that can be
used with different COUNT-based queries.
Boris
More information about the odb-users
mailing list