mattn / go-sqlite3

sqlite3 driver for go using database/sql
http://mattn.github.io/go-sqlite3
MIT License
8.04k stars 1.11k forks source link

How to use SQLITE_ENABLE_UPDATE_DELETE_LIMIT feature #787

Open Qendolin opened 4 years ago

Qendolin commented 4 years ago

https://github.com/mattn/go-sqlite3/pull/564 enabled the SQLITE_ENABLE_UPDATE_DELETE_LIMIT flag, however this comment mentions

Just adding the compile-time option is not sufficient. You would need a custom amalgamation.

so does this mean that #213 is not fixed?

How would I actually be able to use LIMIT and ORDER BY in an SQL statement now?

mattn commented 4 years ago

Currently it does not work. So patch is welcome.

Qendolin commented 4 years ago

I have no idea how to. I hope someone can help. 😃

itizir commented 4 years ago

We've been using this for a while, but it involved us manually rebuilding the amalgamation indeed.

Seems like the easiest here would be to rewrite the upgrade.go script. I've had a go (sorry for the pun :( ) at rewriting it in bash: will push the change and make a PR.