Skip to content
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
Closed

Extends some DML clause with limit and orderby #616

BuBuaBu opened this issue Jan 6, 2014 · 5 comments
Assignees
Milestone

Comments

@BuBuaBu
Copy link

@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
Copy link
Member

@timowest 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
Copy link
Member

@timowest 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
Copy link
Author

@BuBuaBu 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//issues/616#issuecomment-31866543
.

@timowest
Copy link
Member

@timowest timowest commented Jan 8, 2014

I can add it to MySQLQuery, but not SQLQuery.

@timowest
Copy link
Member

@timowest 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants