Skip to content
New issue

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

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

Already on GitHub? # to your account

LIMIT OFFSET in delete() #657

Closed
aleksai opened this issue May 28, 2017 · 3 comments
Closed

LIMIT OFFSET in delete() #657

aleksai opened this issue May 28, 2017 · 3 comments

Comments

@aleksai
Copy link

aleksai commented May 28, 2017

How to enable SQLITE_ENABLE_UPDATE_DELETE_LIMIT, because this one

let messages = Table("messages")
.filter(Expression<String>("chatId") == chat[Expression<String>("id")])
.order(Expression<Date>("createdAt").desc)
.limit(Int.max, offset: index > 29 ? 1 : 30)

try db.run(messages.delete())

removes ALL rows from messages

@Dridus
Copy link
Contributor

Dridus commented Sep 16, 2017

@jberkel since #722 is now merged, should this be closed?

@jberkel
Copy link
Collaborator

jberkel commented Sep 16, 2017

let's leave it open for now, might take a bit before the release branch gets merged into master

@jberkel
Copy link
Collaborator

jberkel commented Sep 30, 2017

Released as part of 0.11.4

@jberkel jberkel closed this as completed Sep 30, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants