New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extends some DML clause with limit and orderby #616

Closed
BuBuaBu opened this Issue Jan 6, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@BuBuaBu

BuBuaBu commented Jan 6, 2014

It would be nice to add some method to limit the row processed to DMLDeleteClause and DMLUpdateClause

Indeed, if you want to delete only x row, on MySQL you can add the modifier "limit x"
and on Oracle "where rownum < x".
I've not check availability with other databases.

On MySQL you can also order the row before deleting with an orderby clause.
Which is not possible with Oracle.

timowest added a commit that referenced this issue Jan 7, 2014

@ghost ghost assigned timowest Jan 7, 2014

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jan 7, 2014

Member

Current status of limit implementation

cubrid    - DELETE UPDATE
derby     - NO     NO
h2        - DELETE UPDATE
hsqldb    - NO     NO
mysql     - DELETE UPDATE
oracle    - DELETE UPDATE (via rownum)
postgres  - NO     NO 
sqlserver - DELETE UPDATE (via top)
sqlite    - NO     NO
teradata  - NO
Member

timowest commented Jan 7, 2014

Current status of limit implementation

cubrid    - DELETE UPDATE
derby     - NO     NO
h2        - DELETE UPDATE
hsqldb    - NO     NO
mysql     - DELETE UPDATE
oracle    - DELETE UPDATE (via rownum)
postgres  - NO     NO 
sqlserver - DELETE UPDATE (via top)
sqlite    - NO     NO
teradata  - NO
@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jan 8, 2014

Member

MySQL seems to be the only db which supports delete with order by, so I will leave that out for now.

Member

timowest commented Jan 8, 2014

MySQL seems to be the only db which supports delete with order by, so I will leave that out for now.

@BuBuaBu

This comment has been minimized.

Show comment
Hide comment
@BuBuaBu

BuBuaBu Jan 8, 2014

I agreed, it seems to specific to MySQL. So I will also not be able to use
the orderby feature.

2014/1/8 Timo Westkämper notifications@github.com

MySQL seems to be the only db which supports delete with order by, so I
will leave that out for now.


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/616#issuecomment-31866543
.

BuBuaBu commented Jan 8, 2014

I agreed, it seems to specific to MySQL. So I will also not be able to use
the orderby feature.

2014/1/8 Timo Westkämper notifications@github.com

MySQL seems to be the only db which supports delete with order by, so I
will leave that out for now.


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/616#issuecomment-31866543
.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jan 8, 2014

Member

I can add it to MySQLQuery, but not SQLQuery.

Member

timowest commented Jan 8, 2014

I can add it to MySQLQuery, but not SQLQuery.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 8, 2014

Member

Released in 3.3.1

Member

timowest commented Feb 8, 2014

Released in 3.3.1

@timowest timowest closed this Feb 8, 2014

@timowest timowest added this to the 3.3.1 milestone Apr 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment