Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1c5l-0000gU-Fe for pgadmin-hackers@arkaria.postgresql.org; Thu, 29 Mar 2018 18:16:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f1c5j-000574-Um for pgadmin-hackers@arkaria.postgresql.org; Thu, 29 Mar 2018 18:16:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1c5j-00056u-Kb for pgadmin-hackers@lists.postgresql.org; Thu, 29 Mar 2018 18:16:03 +0000 Received: from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f1c5Z-0003if-Ic for pgadmin-hackers@postgresql.org; Thu, 29 Mar 2018 18:16:02 +0000 Received: by mail-io0-x231.google.com with SMTP id v13so8686200iob.6 for ; Thu, 29 Mar 2018 11:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h5SxJFN52NJRbv5KuNvX8r8qAbi9Tj3l4DQF+txQPxk=; b=R9nPvdklc4KgLuFLs11bd5IiI8b1YAagMTH5vId0RWobmEVAxLya1KZbbmp6o8ArDr RgDRF4gVpt96VyNgg1krHchQRL/U45i1xn1UJNr1KyXUf2Fa1DAwFC/SyjfjEL0jXfrX 390O/QSiCPz0Ahf79eC2H4iT/Oxnld5dIP+Z7s+Df/JwKzdWUsmFzq/pcMVJqqJqoHHw GAaBJTb0bhhZL334h8kFfHwC+/9dCISjBNUobQYiHQGo63dqhPBQreziU4x8SnIrxt/w y7F+5+X3eblHpti3qdrms5hqvFlb3OLYl61I3m2icBVoRf4rxdTsRf6O1A1m00EFvVCc abDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h5SxJFN52NJRbv5KuNvX8r8qAbi9Tj3l4DQF+txQPxk=; b=GPWVdzRuUfw3PHD/mKns7vaYkXXTyK1vBStcc3YSLpmKDZV0qqL1imZQz8tXdfs8Y+ aYWW+rxLEosuMhzf+C3yUoqcLsUZutaJDdaQITkItQSTOfkGiZKnUNrN7PYuTHCX+74N 52ucTSec5uqQ/iIEbJAk1ID2y7mKEOo1Yl8XhdmUD1Q0m7QyYTpfqlfBOKfaOCQ9F1eZ Odou16BHidnnk88NB7obeIUp6Bxt3DkQd1Rchl9uxF0gSUNLjSxyWMT76ZpEFZ5oysfZ 8KojtB4d/qfBj33IXUX4R2k9LWZvzBvOTKG2KggHchK3POs9+M5JPaakjmocBo8DWkny 1GBg== X-Gm-Message-State: AElRT7EGavsdWjquyBvztNIIg8tNQiLZq4gQqyCHf3kxvCdXLfNZgnRV B2VJ2fTypylpQvLkdL9pILY/d0d7E7nhz2dPTyHu3A== X-Google-Smtp-Source: AIpwx4+7mWWtFYkJiBGKxgIF7fCXXTJyJQk6VxSAK9VeN7N8+Gfl0RAuwOBOxcla8c0kGKuMY+cSxCIBgfKeKvH2baM= X-Received: by 10.107.171.194 with SMTP id u185mr30950244ioe.234.1522347350336; Thu, 29 Mar 2018 11:15:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joao De Almeida Pereira Date: Thu, 29 Mar 2018 18:15:39 +0000 Message-ID: Subject: Re: [pgAdmin4][Patch][Feature #1998] Appends .sql if extension not given when using 'save' or 'save as' feature To: Rahul Soshte Cc: pgadmin-hackers@postgresql.org Content-Type: multipart/alternative; boundary="94eb2c05b49e0b50e80568911d9f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --94eb2c05b49e0b50e80568911d9f Content-Type: text/plain; charset="UTF-8" Hi Rahul, I see you extracted some code, that is a pretty good move :D We run the patch through the testing pipeline and everything is green GJ :D Also tested the functionality by hand and looks like it is working except for "add the .sql extension when format is set to SQL." if you set it to All Files the extension is also added. Not sure if this is a big deal or not. Lets see what other people think. Codewise here are some of my comments: . You added the yarn-error.log file and a migration to the patch doesn't look intentional. Can you please remove them? . Also in the patch there are 2 file (moc_LogWindow.cpp and ui_LogWindow.h) that look like they do not belong to the patch (Did you rebase your branch before trying to create the patch? The test file: test_save_query_to_file.py is empty, it is missing some tests there. As a convention we user lower case names for functions and UpperCase for class Please, regenerate the patch following my previous comments. Thanks Joao On Thu, Mar 29, 2018 at 12:54 PM Rahul Soshte wrote: > Hi, > When using save or save as feature if .sql is not provided this Patch > appends it. > as clearly mentioned in this link. > > https://redmine.postgresql.org/issues/1998 > > I have ran pep8,regression and Jasmine tests too. > > I have primarily changed these files > web/pgadmin/tools/sqleditor/__init__.py > web/pgadmin/tools/sqleditor/static/js/sqleditor.js > web/pgadmin/tools/sqleditor/utils/save_query_to_file.py > > > Regards, > Rahul Soshte (Hunter) > > --94eb2c05b49e0b50e80568911d9f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Rahul,
I see you extracted some code, that is a pre= tty good move :D

We run the patch through the test= ing pipeline and everything is green GJ :D
Also tested the functi= onality by hand and looks like it is working except for "add the .sql extension when format is set to = SQL." if you set it to All Files=C2=A0 the extension is also ad= ded. Not sure if this is a big deal or not. Lets see what other people thin= k.

Codewise here are some of my comments:
. You added the yarn-error.log file and a migration to the patch doesn= 9;t look intentional. Can you please remove them?
. Also in the p= atch there are 2 file (moc_LogWindow.cpp and ui_LogWindow.h) that look like= they do not belong to the patch (Did you rebase your branch before trying = to create the patch?

The test file:=C2=A0test_save= _query_to_file.py is empty, it is missing some tests there.

<= /div>
As a convention we user lower case names for functions and UpperC= ase for class

Please, regenerate the patch followi= ng my previous comments.

Thanks
Joao
On Thu, Mar 29, 2018 at 1= 2:54 PM Rahul Soshte <rahuls= oshte360@gmail.com> wrote:
<= div dir=3D"ltr">
Hi,
When using save or save as = feature if .sql is not provided this Patch appends it.
as clearly mentio= ned in this link.

https://redmine.postgresql.org/issues/1998
I have ran pep8,regression and Jasmine tests too.

I ha= ve primarily changed these files
=C2=A0=C2=A0=C2=A0=C2=A0 web/pgadmin/to= ols/sqleditor/__init__.py
=C2=A0=C2=A0=C2=A0=C2=A0 web/pgadmin/tools/sql= editor/static/js/sqleditor.js
=C2=A0=C2=A0=C2=A0=C2=A0 web/pgadmin/tools= /sqleditor/utils/save_query_to_file.py


Regards,=
Rahul Soshte (Hunter)

--94eb2c05b49e0b50e80568911d9f--