[odb-users] Using CTEs in ODB queries
Boris Kolpackov
boris at codesynthesis.com
Wed Aug 3 11:45:41 EDT 2016
Hi,
Whisperity <whisperity at gmail.com> writes:
> [...] so I am requesting a review for this little patch, maybe it will help
> other users in the next release:
>
> s.compare (0, (n = 4), "WITH") == 0 || s.compare (0, (n = 4), "with") == 0
Thanks, committed for the next release:
http://scm.codesynthesis.com/?p=odb/libodb-pgsql.git;a=commit;h=fa085bca16a685b768e091c7c352e97677b4d8ff
> Along with this issue, I have another one. It is not trivial at first
> glance, but where we are using this query is actually a link table defining
> one-to-many relationships, or at least considering a view of this
> calculated relationship. If I try to use std::vector<::types::someIDtype>
> other_id as my second field (or any other collection), the ODB compiler
> throws an error. Is it possible to make ODB believe that it should give me
> a "list of IDs grouped by another column"? Or should I do this grouping in
> my program on a sorted result?
I am not sure I understand what you are trying to achieve. A small
example might help.
Generally, you cannot load containers in views thought you could load
a container as a view (i.e., view representing each element).
Boris
More information about the odb-users
mailing list