Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6Dv-0006sA-T4 for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Jun 2019 11:36:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hg6Dt-0004gN-HG for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Jun 2019 11:36:21 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6Dt-0004gF-AI for pgadmin-hackers@lists.postgresql.org; Wed, 26 Jun 2019 11:36:21 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6Dq-0006za-KM for pgadmin-hackers@postgresql.org; Wed, 26 Jun 2019 11:36:20 +0000 Received: by mail-wr1-x441.google.com with SMTP id p13so2312393wru.10 for ; Wed, 26 Jun 2019 04:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2CRvsUe9CFUW7azF9XQxGO+CzHphCLIDbwvQ/B+8zpc=; b=JikQHQ4hPAsaERIIpFAFbXciXr3KxqX8ZhsBe06a/53UN0FZ6nRotLSJBCxnsnOuhV tYDSjLaXF0iGNj4GnADBk8CeKM89GkJXzH3q7/ngOPvW32aevZxz4GwFKBDyXwhRJ3nY zBB5FzLD6BTA4OXHqRHuxpYV538b6kVuy6J9uT5lnKDBNzFEWS8gYVUOfNfGKsNZAI40 ePmNM57kqcrzrsjdqsvZNj8yP8c/ENs+jmxwDI4nUCdXSq7nGbx4kJCUj5CqDocZ2qSi xlKP/Gujyk/oSbBY/giVnKL9cHtoe/HjfYX9g3GcAPbr7jX3SKb3ufkAuhiQUe6RZAqZ 7u2g== 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=2CRvsUe9CFUW7azF9XQxGO+CzHphCLIDbwvQ/B+8zpc=; b=G4rYUL26kBJDngZ7JuaIH9T5ukpoWTsn210UflLb9HbIYbBXOJReuSwv+BJgo33v0G hm664tRFyuYuDCP2sAnt531BdIqgCH2YWekrF/efPLei+gv4fzmWacIVeRnW5tUqCiqO DDHYlRdqKB4yRjomPw/7u+uNMkMzzHAPNUItsKF2RM8naCVu4h4Y1OZtPsiWC3vw310D ZcY2OREfa2//hQKZEruM3bFEFCW+2xBz/olUCNBSTxP2GIP72nu83pO/bOP3/YqcjjR0 mnCQIVEcS6pGAzWNhdWrJiBsUoT9MVzSbCOCyp6Uq7M0xa3WU+0/xnUZm/Y/JyRi7RIu szjg== X-Gm-Message-State: APjAAAUs9nqmUxv+euRlL0MmksVsUGaOB7+Aq6pNrXPqzP60j+LzflRh v8+3c4P8fVHNoNa5cBThOCf9AxNrFr11lLG1LmpXvt7xFcQ3kg== X-Google-Smtp-Source: APXvYqxhZXoneVpWBpXJDWXgujTbwmpVv2mQfsNHYUbHVMVo8mcmIv+TnvrJCzWjB1Pr8YmxoEKIwR7RP8ENZw51p/U= X-Received: by 2002:adf:f104:: with SMTP id r4mr3547860wro.140.1561548977700; Wed, 26 Jun 2019 04:36:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Wed, 26 Jun 2019 07:36:06 -0400 Message-ID: Subject: Re: [pgAdmin][RM4139] Drag and drop object names in Query Editor from Browser Tree To: Aditya Toshniwal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000001d9cf6058c3874a5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000001d9cf6058c3874a5 Content-Type: text/plain; charset="UTF-8" On Wed, Jun 26, 2019 at 7:28 AM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi, > > On Wed, Jun 26, 2019 at 4:51 PM Dave Page wrote: > >> Hi >> >> On Wed, Jun 26, 2019 at 2:24 AM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> Attached is the patch to allow tree nodes to be dragged and dropped in >>> query editor wherever you take the drop cursor. The drop text will be fully >>> qualified and double quoted if required. >>> For functions/procedures it will drop the the label stripping away the >>> parameter names, with empty pair of round brackets. It will also set the >>> focus cursor inside the brackets if there were params otherwiser to the end >>> of text. >>> For adding a node type, you need to register it in browser.js along with >>> a callback function which will return drop text along with cursor >>> positioning and selection. Currently, I have registered for "table >>> partition type sequence package view mview foreign_table edbvar schema >>> column edbfunc function edbproc procedure". >>> >>> Please note, the drag design customisation is not supported in IE. >>> >> >> I think for functions/procedures, we should include placeholders for the >> parameters, so the user has a hint about what they need to fill in to >> complete the call. >> > I can fill in the parameter names same as tree node, with cursor selection > on all the params ? > Can you select the first one, and put the cursor in front of it? > >> Also; shouldn't there be a doc update? >> > Yeah :/ > Should there be any screenshots ? > I don't see much need. Thanks. > >> Thanks. >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --0000000000001d9cf6058c3874a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jun 26, 2019 at 7:28 AM Adity= a Toshniwal <aditya= .toshniwal@enterprisedb.com> wrote:
Hi,

On Wed, Jun 26, 2019 at 4:51 PM Da= ve Page <dpage@pg= admin.org> wrote:
Hi

On Wed, Jun 26, 2019 at 2:24 AM Aditya T= oshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

A= ttached is the patch to allow tree nodes to be dragged and dropped in query= editor wherever you take the drop cursor. The drop text will be fully qual= ified and double quoted if required.
For functions/procedures it will drop the the label stripping = away the parameter names, with empty pair of round brackets. It will also s= et the focus cursor inside the brackets if there were params otherwiser to = the end of text.
F= or adding a node type, you need to register it in browser.js along with a c= allback function which will return drop text along with cursor positioning = and selection. Currently, I have=C2=A0registered for "table partition type sequence package view mview = foreign_table edbvar schema column edbfunc function edbproc procedure"= .

Please note, the drag design customisat= ion is not supported in IE.

<= div>I think for functions/procedures, we should include placeholders for th= e parameters, so the user has a hint about what they need to fill in to com= plete the call.
I can fill in the parameter = names same as tree node, with cursor selection on all the params ?

Can you select the first o= ne, and put the cursor in front of it?
=C2=A0

Also; shouldn't there be a = doc update?
Yeah :/
Should ther= e be any screenshots ?=C2=A0

=
I don't see much need.

Thanks.
=C2=A0

Thanks.
=C2=A0
--
Dave Page=
Blog: http://= pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprised= b.com
The Enterprise PostgreSQL Company


--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB I= ndia |=C2=A0Pune
"Don't Complain about Heat, Plant a TREE"


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @p= gsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL = Company
--0000000000001d9cf6058c3874a5--