Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

New feature: Search + replace on table rows

ansgar's profile image ansgar posted 7 years ago in News Permalink
Most HeidiSQL users have used the search/replace dialog. From now on, this dialog does not only support searching in a query editor, but also in data grids and query result rows!



An interesting new feature for users who avoid writing UPDATE queries. And of course for those who want the power of regular expressions with callbacks when modifying table rows.

Thanks to klorinczi for the idea!
BubikolRamios's profile image BubikolRamios posted 7 years ago Permalink
I would suggest another dropdown, under 'blue' ('Search in:')one.
That would be enabled if 'data grid' would be selected and would contain list of columns in grid, like (as per attached image):

All (default)
proc_id
debug_otput
....



Ok there is workaround = change query to contain only column which you want to mod by regex, but that is not handy.

ansgar's profile image ansgar posted 7 years ago Permalink
That would duplicate the column selection, and I think the dialog is already crowded enough for such simple search stuff.
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
BubikolRamios's profile image BubikolRamios posted 7 years ago Permalink
Hmm, was not avare that sorting column is also selecting it.

Anyway I tried in upper case, where the contence of table is constantly changing (delete all, add a bunch of new records), hence a bunch of errors popped up on 'replace all' command.

I guess there is no lock on table when you clic 'replace all' ?
I think lock should be done.
BubikolRamios's profile image BubikolRamios posted 7 years ago Permalink
Yeah ,no lock. Otherwise I would see lock in lower window, right ?
BubikolRamios's profile image BubikolRamios posted 7 years ago Permalink
On second thought, lock, the moment the 'Search and replace text' window is opened. Unless the errors would be cumulatively popede out in lower window after 'replace all' command ...
Without bunch of message boxes.
BubikolRamios's profile image BubikolRamios posted 7 years ago Permalink
Tested on 'fixed' contence table. I guess this shoul do regex replace only on first column in query result grid, as the first columnns is selected by clicking on column title ?

It does not do so, it replacec in complete data grid.

ansgar's profile image ansgar posted 7 years ago Permalink
Well, that's intentionally. Use the column selector to deselect unwanted columns first.
BubikolRamios's profile image BubikolRamios posted 7 years ago Permalink
There is no column selector on data grid that is result of query. Only on data grid as resut of data tab on table.

Point beeeing - I see a big plus of this search & replace & regex thing. It should enable you to do what you can't do in mysql at all, without writing extra program for that.

But, as it is wery likely that I would do regex update based on things that I see in other columns, I don't want them to be hidden.

Obout LOCK from other posts above, I think the best flow would be:
1.click replace all
2.lock table
3.reselect based on query (as data mybe changed while looking at dialog)
4.do update
5.unlock table
BubikolRamios's profile image BubikolRamios posted 7 years ago Permalink
Mybe general fuctionality of selecting colums in data grid,windows like (MS Excell, OO Calc),
CTRL +Click , SHIFT +click should be implemented.

You would have then sort funczionality limited to sort icon in column title only.

I see many benefits of that.
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 7 years ago Permalink
> There is no column selector on data grid that is result of query

I meant the data tab, not the query tab. Writing a query, users select columns by the editable query.
Rvanlaak's profile image Rvanlaak posted 7 years ago Permalink
Maybe a "preview changes" function would be nice. No idea how you're managing the change-queries, something with color-highlighting in the grid would be even great.

Please login to leave a reply, or register at first.