[odb-users] Pagination and "join","groupby" in odb

Scott Zhang macromarship at gmail.com
Wed Sep 12 03:43:38 EDT 2012


Hello. All.
    I have quickly went over the odb-manual.pdf. Basically the mapping of
class to table(activerecord), and Query on single table/class is what I
need. Another few features I need are "pagination" which limit the returned
number and starting number of query. And join/group by etc features. I
don't see where are them. Can anyone help on this? Thanks.


    And I have some options about odb.  Sorry I am a mostly
.net(subsonic)/php(codeignitor)/java(struts2) developer.  so I am fan of
easy use of orm/activerecord provided with these library. On C++
developing, I usually use mysqlcppconn library previously but that need to
write sql all the time. Then I want to change to use a orm where odb falls
in.
    In my view of odb, basically the activerecord and query are cool. The
view/container/relations/inheritance looks provided too much features and
included too much new rules different from other frameworks/library. I
found it is hard to remember them all and most of work can be done only use
the activerecord and query only.
    ODB's design works smiliar like django(python) and RubyOnRails, you
draft the class using your rules first, then generate sql to create the
database, then everything works cool. But if you create the database first,
especially coding with a php front end done, then code with c++ and odb to
fit your existing tables relation with your class, that would be a big
headache(for relations, container, inheritance ....). So I think only the
basic activerecord and query should be enough. Just my option because I
don't think I will use these complex container/relation .... .  I will
control the relations from c++ code level.

Thanks.
Regards.
Scott


More information about the odb-users mailing list