[odb-users] DISTINCT clause usage problem

Енакаев Алексей Aleksey.Enakaev at infotecs.ru
Fri Jan 24 01:37:52 EST 2014


Tell me please, if there is any way to create ODB object view with 
'DISTINCT' clause on some column:

'SELECT DISTINCT ON( id ) id, name, some_other_fileld FROM table1 JOIN 
table2 ...'?

ODB object view described like this:

#pragma db object view( Company ) \
                         object( Person: Person::company_id == 
Company::company_id )
struct CompanyByPerson
     uuid company_id;
     // company columns
     // ...
     // person columns
     // ...

Best regards.

С уважением,
Енакаев Алексей.
Отдел Юникс.

More information about the odb-users mailing list