SQL : Support for batch in DML clauses

Bug #608105 reported by Timo Westkämper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

Support for batch in DML clauses

Revision history for this message
FilipVercauteren (filip-vercauteren-agfa) wrote : Filip Vercauteren is out of the office.

I will be out of the office starting 21/07/2010 and will not return until
09/08/2010.

summary: - SQL : Support for batch in SQLUpdateClause
+ SQL : Support for batch in DML clauses
description: updated
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :
Changed in querydsl:
status: New → In Progress
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Support for batch in SQLInsertClause has been added

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Batch support for INSERT, DELETE and UPDATE is available.

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

UPDATE :

    @Test
    public void batch() throws SQLException{
        insert(survey).values(2, "A").execute();
        insert(survey).values(3, "B").execute();

        SQLUpdateClause update = update(survey);
        update.set(survey.name, "AA").where(survey.name.eq("A")).addBatch();
        update.set(survey.name, "BB").where(survey.name.eq("B")).addBatch();
        assertEquals(2, update.execute());
    }

DELETE :

    @Test
    public void batch() throws SQLException{
        insert(survey).values(2, "A").execute();
        insert(survey).values(3, "B").execute();

        SQLDeleteClause delete = delete(survey);
        delete.where(survey.name.eq("A")).addBatch();
        delete.where(survey.name.eq("B")).addBatch();
        assertEquals(2, delete.execute());
    }

INSERT :

    @Test
    public void batch(){
        SQLInsertClause insert = insert(survey);
        insert.set(survey.id, 5).set(survey.name, "5").addBatch();
        insert.set(survey.id, 6).set(survey.name, "6").addBatch();
        assertEquals(2, insert.execute());
    }

Changed in querydsl:
status: In Progress → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 1.9.1

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.