-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Feature]: Display templated/prepared insert into command in any table #3817
Comments
Good idea, but I've implemented it in a slightly different way. There was already drag and drop support in the DB Schema dock for building select queries. I've added support for choosing insert statement too. Also for copying to the clipboard, and not only for drag and drop, but with the same text. You can try it in the latest nightly. There's a problem I still have to fix, though, related with saving the user election as settings. |
Put all the drag+drop/copy options in a submenu. See issue #3817
I've fixed the problem with the settings and restructured the contextual menu. @Andersama, the next nightly build will be ready for testing. |
Took me a bit to figure out where the edit was. I was thinking more in the table browsing tab because at the moment you can select columns to create an insert command, but its prefilled with data from the row. It may be worth making it its own shortcut, I don't deal with UI much, but I'd find it confusing that the behavior of |
Describe the new feature
Currently there is a very handy feature to copy an insert command which represents a row in a table with the shortcut
CTRL+ALT+C
However in an empty table, the prompt appears:
Which would suggest it "does" something, but nothing occurs.
It would be very useful to have a shortcut and or context menu item which creates a prepared insert command. IE not one pre-filled with data from the row, but rather the insert command you'd actually use in your applications.
For example in my non-empty table using the shortcut I might get:
INSERT INTO "main"."items" ("uuid", "item_name") VALUES ('35d94866-392d-4aab-86dc-098cd8b07511', 'an_item');
We might imagine having these presented from any table:
INSERT INTO "main"."items" ("uuid", "item_name") VALUES (@uuid, @item_name);
INSERT INTO "main"."items" ("uuid", "item_name") VALUES (:uuid, :item_name);
INSERT INTO "main"."items" ("uuid", "item_name") VALUES ($uuid, $item_name);
This could also appear in the "Add New Record" prompt:
Does this feature exist in another product or project? Please provide a link
No response
Do you have a screenshot? Please add screenshots to help explain your idea.
No response
The text was updated successfully, but these errors were encountered: