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

saving edited sql file (cmd+s) #46

Open
cakl opened this Issue Aug 11, 2015 · 10 comments

Comments

Projects
None yet
6 participants
@cakl
Copy link

commented Aug 11, 2015

following steps:

  • open a .sql file
  • modify the file
  • press cmd+s to save the file or File>Save
    result: file is not saved

I don't know if this is an issue or a feature request.

@jakob jakob added the enhancement label Sep 28, 2015

@luckydonald

This comment has been minimized.

Copy link

commented Dec 28, 2015

Feels like an issue to me.

@jakob

This comment has been minimized.

Copy link
Owner

commented Dec 28, 2015

I'm working on improving the handling of SQL files, along the lines of #18

This will also make Cmd-S save queries (I'm even thinking of auto-saving).

@luckydonald

This comment has been minimized.

Copy link

commented Dec 28, 2015

Auto-saving would be great, but please make it optional.
Also, let .sql files be opened in Postico.
(Open with..., Drag file on application icon etc.)

@xidazheng

This comment has been minimized.

Copy link

commented Mar 18, 2016

Cmd+s saving would be great. Autosave with feedback is always greater :)

@luckydonald

This comment has been minimized.

Copy link

commented Mar 20, 2016

this apple versioning stuff? Never really liked that. Always overwrites files I just opened...

@turgs

This comment has been minimized.

Copy link

commented Mar 31, 2016

+1 I would love this. I guess many users use Portico to browse around their DB and check stuff. I use it to write long complex SQL scripts. Currently I have to remember to copy/paste the SQL to somewhere else to save/open it.

@stevemcmillen

This comment has been minimized.

Copy link

commented Aug 12, 2017

+1 I would love to see ability to save the loaded query. Seems soooo close. Already allow open query and save query but would like to have cmd-s just save the open query to file. I work between different machines and it becomes cumbersome to always be remembering to unload a query on one machine before going to work and finding my changes are sitting in my postico instance at home and I either have to re-create or put the project on pause until I get back home.

Is this really that far away from implementation? This request has been open for 1 year. Seems a very small change to allow cmd-s to save back to the most recently loaded query in current tab.

@stevemcmillen

This comment has been minimized.

Copy link

commented Aug 12, 2017

Note: It would be important for the Postico app to load the SQL file from disk when opening so that any changes made to the file are loaded and saving it would avoid loosing those changes. Basically, loading a query should act just like that favorite is linked to the file and stays linked. Autosave would be a huge plus for me since it would avoid risk of forgetting to save but I see other folks points about concerns regarding this feature.

p.s. I was able to use apple automator to go thru the motions of clicking save query button.

@jakob

This comment has been minimized.

Copy link
Owner

commented Aug 14, 2017

Thanks for all your comments. At the moment I can't change the way that the query editor works. I agree that it would be great if the query editor worked like a normal text editor, but it is not trivial. Consider what happens when a file is opened in multiple Postico windows -- somehow those changes would have to be synced. Or if a file is modified on disk, while there are pending changes in Postico -- how should that conflict be handled?

I see the current solution as a bit of a hack, but it was the best I could do given how the query view works in Postico. I am planning to change this in a future version, but it'll still take me some time to make sure it all fits together.

@stevemcmillen

This comment has been minimized.

Copy link

commented Aug 14, 2017

Thanks. That's too bad but I understand.

Note: I did think about multiple editors when I posted. I see apps like BBEdit will give you the choice to automatically re-read from disk if changes detected or choose to ignore. It would be nice to have some UX would flag that a change was read off disk so user could be alerted of this.

I don't know how these editors handle case when changes are occurring from different sources at same time but that seems like quite an edge case. I would have to have two versions of the doc being edited on two machines that have access to same disk - Seems like a very unlikely use case.

Anyways, I understand and respect your decision not to add this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.