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

Naked deletes now just delete everything instead of iterating #82

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

Hydrocharged
Copy link
Contributor

I mean this works but it's ugly and I'm not sure of a better way to do it really

@Hydrocharged
Copy link
Contributor Author

Also, darn it Zach but an empty map was causing a panic lol

return nil, false
}
// This is so the results are displayed as expected
if _, sqlSch, rowIter, err := sqlNewEngine(fmt.Sprintf("select COUNT(*) as updated from `%v`", tName), root); err == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be expensive -- it loads the entire table of data just to count it. You should get the number of rows by calling .size() or similar on the table map

@Hydrocharged Hydrocharged merged commit ed3dc4d into master Sep 25, 2019
@Hydrocharged Hydrocharged deleted the daylon/sql-special branch October 17, 2019 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants