TablePlus / Bolt-SQL-issue-tracker

2 stars 0 forks source link

Cannot update values directly from Data table. #8

Closed olvrcrls closed 10 months ago

olvrcrls commented 11 months ago

Query anything that will result some data, update that data. The application will prompt a couple of buttons:

image

Once the Commit button is clicked after the data update, it doesn't really update the data column when you re-select the data again with a select query.

sonswift commented 11 months ago

Hi @olvrcrls, thank for you feedback. Could you give me a piece of your query? I could not reproduce this issue.

huyphams commented 10 months ago

Hi @olvrcrls which database are you using?

olvrcrls commented 10 months ago

Hi @olvrcrls, thank for you feedback. Could you give me a piece of your query? I could not reproduce this issue.

Basically any result from a SELECT query. Update the data from there and commit, try to run the same select query with the same dataset that you updated, the changes does not push through.

olvrcrls commented 10 months ago

Hi @olvrcrls which database are you using?

MySQL.

olvrcrls commented 10 months ago

I will send a recording in my free time. I am using MacOS Sonoma for this software

sonswift commented 10 months ago

Hi @olvrcrls, have you tried to run the updated query in the Preview dialog?

image

olvrcrls commented 10 months ago

Hi @olvrcrls, have you tried to run the updated query in the Preview dialog?

image

Hello, yes I did. It ran as is but the direct edit on the data table does not persist.

olvrcrls commented 10 months ago

Just a follow-up on this one, I can update it now via the data table on a different database connection. Also, I can update the column data I want to update via this kind of SELECT query:

SELECT id, column_to_update FROM table;

Weirdly enough, I cannot update the column value on my particular database and I cannot share it with you guys. For now, this is my way of using the software if I want to update some particular column from the data set.

I tried to use the software and update the column value via data table UI with a simpler database schema, it worked as expected. I guess the bug occurs for some index keys.

Ticket closed. Thank you, BoltSQL team 🙏🏼

olvrcrls commented 10 months ago

Hi @olvrcrls, have you tried to run the updated query in the Preview dialog?

image

I tried to run the preview on the database I encountered the bug with, the WHERE statement is not only referring to the id column it defers to a lot actually which is why it might be an index key problem.

Thank you though!

huyphams commented 10 months ago

Your table does not have primary, Bolt SQL uses primary for the where, if there is no primary, it will use all the columns.

But I think Bolt SQL should also check the unique not null index (same as primary).