Re: [pgAdmin4] Patch: Added new Control SqlFieldControl

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4] Patch: Added new Control SqlFieldControl
Date: 2016-02-03 05:19:42
Message-ID: CAG7mmoxDrnzqgzN9P44g+d1-s49CWV2ZZvNYxK0q=sCabSpvcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Surinder,

On Tue, Feb 2, 2016 at 1:05 PM, Surinder Kumar <
surinder(dot)kumar(at)enterprisedb(dot)com> wrote:

> Hi,
>
>
> Please find patch for SqlFieldControl.
>
Thanks for the patch.

>
> This control allows the user to write/edit SQL queries.
>
K

>
> To use SqlFieldControl, Set *control* property of field to *'sql-field' *in
> model's schema like:
>
> {
> id: 'definition', label:'{{ _('Definition') }}', cell: 'string',
>
> control: 'sql-field'
> }
>
K.

Please extend the SqlFieldContorl from the Backform.TextareaControl *instead
of* Backform.Control.

* Do not need to set events, TextareaControl has handled those events.
* Extend 'getValueFromDom' function in order to get the value from the sql,
and set it to the model.
* Don't listen to the 'pg-property-tab-changed' event here. (It is
redundant here).
In your implementation, you're already refreshing lazely using setTimeout
function, which should refresh issue of CodeMirror any way.

As per our personal discussion, please update the 'updateInvalid' function
for the Control to look for only the 'input' tag with 'name' attribute.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
>
>
> Regards,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Neel Patel 2016-02-03 05:24:46 Re: pgAdmin 4 commit: Update the runtime to properly support Windows.
Previous Message Sergey Busel 2016-02-03 03:25:53 Re: pgAdmin III: Muliple SQL tabs