Re: Autosave in the SQL Editor - Mailing list pgadmin-hackers

From Vinicius Santos
Subject Re: Autosave in the SQL Editor
Date
Msg-id CAOTD_5Ehm8bBpuz=pjGidxa=A1EBK0SKi55Z-tEy7+5QtY8D3A@mail.gmail.com
Whole thread Raw
In response to Re: Autosave in the SQL Editor  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Autosave in the SQL Editor  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgadmin-hackers

Well, this seems good but there's an issue I don't know how you want to
deal with it: what's happens if I had more than one window opened?

I'm saving a file for each window.
Each window have a private variable called "fileNameAutoSave"

The query is salved from time-to-time. As configuration.
 
IOW,
how do you decide which file you should open? if there is more than one
file, and some files were open on different databases, how will you
handle this?

I had thought about putting the information in the file name. For example: "server_port_database_date_time.pga".
The date and time are saved in the creation of frmQuery.

We can save it in the file header too. We put this information in the first line. And we put another name for the file.

When there are more than one file, we asked for user, if he wants to open all of them.
Of course we will open only the files that database.

What do you think?

PS: Forgive my English. I'm learning english, and I'm using a little the Google Translate.

pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Russian translation
Next
From: Guillaume Lelarge
Date:
Subject: Re: Autosave in the SQL Editor