cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-2192) column() and columns() methods in ObjectSelect
Date Wed, 04 Jan 2017 11:47:58 GMT

     [ https://issues.apache.org/jira/browse/CAY-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nikita Timofeev updated CAY-2192:
---------------------------------
    Affects Version/s: 4.0.M5

> column() and columns() methods in ObjectSelect
> ----------------------------------------------
>
>                 Key: CAY-2192
>                 URL: https://issues.apache.org/jira/browse/CAY-2192
>             Project: Cayenne
>          Issue Type: Sub-task
>          Components: Core Library
>    Affects Versions: 4.0.M5
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>
> {code}           
>         // Single column
>         long totalCount = ObjectSelect.query(Artist.class)
>                             .column(Artist.ARTIST_COUNT)
>                             .selectOne(context);
>                             
>         // Several columns
>         List<Object[]> result = ObjectSelect.query(Artist.class)
>                                     .columns(artistCount, minSalary, namePart)
>                                     .select(context);
>         for(Object[] r : result) {
>             long count = (long)r[0];
>             int min = (int)r[1];
>             String namePart = (String)r[2];
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message