cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dzmitry Kazimirchyk (JIRA)" <>
Subject [jira] [Created] (CAY-2053) SQLExec fluent query API
Date Fri, 22 Jan 2016 15:53:39 GMT
Dzmitry Kazimirchyk created CAY-2053:

             Summary: SQLExec fluent query API
                 Key: CAY-2053
             Project: Cayenne
          Issue Type: Improvement
            Reporter: Dzmitry Kazimirchyk

Implement fluent API for non-selecting SQL queries.

Some examples of the new SQLExec query syntax:

// insert
int inserted = SQLExec.query("INSERT INTO ARTIST (ARTIST_ID, ARTIST_NAME) VALUES (#bind($id),
#bind($name))").paramsArray(55, "a3").update(context);

// update
int updated = SQLExec.query("UPDATE ARTIST SET ARTIST_NAME = 'b3' WHERE ARTIST_NAME = 'a3'").update(context);

Also the plan is to use List<QueryResult> instead of our current ugly QueryResponse
in ObjectContext.

This message was sent by Atlassian JIRA

View raw message