<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:33:56 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[INSTRM-1298] Add select_copy_to method</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/INSTRM-1298</link>
                <project id="10300" key="INSTRM">Instrument control development</project>
                    <description>&lt;p&gt;There is a new &lt;tt&gt;insert_copy_from&lt;/tt&gt; method on Opdb which allows efficient copying from the user to the database, which is absolutely necessary for FPS/MCS operations. Those actors also need to copy from the database to the user &amp;#8211; the MCS needs the FPS targets, and the FPS needs the MCS matches.&lt;/p&gt;

&lt;p&gt;So can we add &lt;tt&gt;select_by_copy(sqlSelect&lt;/tt&gt; or something? I admit that I get confused by the postgres terminology of COPY_FROM and COPY_TO. We probably do not need to expose the internal postgres names that way, so &lt;tt&gt;insert_by_copy. select_by_copy&lt;/tt&gt;, or &lt;tt&gt;insertBulk, selectBulk&lt;/tt&gt; might be better?&lt;/p&gt;

&lt;p&gt;Also, can the opdb methods have the context manager or try-except wrapping? Leaving transactions open on failures causes all sorts of trouble later.&lt;/p&gt;</description>
                <environment></environment>
        <key id="16896">INSTRM-1298</key>
            <summary>Add select_copy_to method</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</type>
                                            <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="kiyoto.yabe">Kiyoto Yabe</assignee>
                                    <reporter username="cloomis">cloomis</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Jun 2021 17:10:57 +0000</created>
                <updated>Wed, 14 Jul 2021 22:56:30 +0000</updated>
                            <resolved>Wed, 14 Jul 2021 22:56:30 +0000</resolved>
                                                                    <component>spt_operational_database</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="21544" author="rhl" created="Mon, 21 Jun 2021 17:38:42 +0000"  >&lt;blockquote&gt;&lt;p&gt;can the opdb methods have the context manager or try-except wrapping&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;surely we should use the context managers not &lt;tt&gt;try/except&lt;/tt&gt; in all new code.&lt;/p&gt;</comment>
                            <comment id="21545" author="cloomis" created="Mon, 21 Jun 2021 17:42:47 +0000"  >&lt;p&gt;I &lt;b&gt;strongly&lt;/b&gt; agree, but the sqlalchemy proxy for the psycopg2 engine does not obviously have a working context manager. New versions might.&lt;/p&gt;</comment>
                            <comment id="21556" author="kiyoto.yabe" created="Wed, 23 Jun 2021 06:35:27 +0000"  >&lt;p&gt;For select_by_copy method, I think I can implement that. Considering existing method names, is it OK to name them `insert_by_copy` and `fetch_by_copy`?&#160;&lt;/p&gt;

&lt;p&gt;For the error handling, I think I can consider the context manager, though it may be beyond my ability to design and implement. Could you make a separate ticket for this, just in case? &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=cloomis&quot; class=&quot;user-hover&quot; rel=&quot;cloomis&quot;&gt;cloomis&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="21685" author="cloomis" created="Tue, 13 Jul 2021 19:47:25 +0000"  >&lt;p&gt;I&apos;m moving the request to use context managers to a separate ticket so that the copy_{to, from} work can be merged.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|zzs8co:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>