Skip site navigation (1) Skip section navigation (2)

Re: Autosave in the SQL Editor

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Vinicius Santos <vinicius(dot)santos(dot)lista(at)gmail(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Autosave in the SQL Editor
Date: 2012-08-08 06:59:57
Message-ID: 1344409197.1964.48.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Tue, 2012-08-07 at 18:20 -0300, Vinicius Santos wrote:
> 
> 
>         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.

OK.

>  
>         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".

Where is it saved?

You also need to have a way to delete those files.

> 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.
> 

Yeah, I think the informations should be available in the file (for
example if your database has a _ in its name, it will be hard to decode
the informations from the filename.

> 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?
> 

Should be enough. Not sure how you'll open that many query tools though.

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

No problem, don't worry :) I'm also not a native speaker.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com


In response to

Responses

pgadmin-hackers by date

Next:From: Vinicius SantosDate: 2012-08-08 15:50:02
Subject: Re: Autosave in the SQL Editor
Previous:From: Vinicius SantosDate: 2012-08-07 21:20:33
Subject: Re: Autosave in the SQL Editor

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group