Skip to content

Commit 2c70481

Browse files
add genomics comments
1 parent 94c2d4a commit 2c70481

4 files changed

Lines changed: 49 additions & 0 deletions

File tree

Model/bin/ssLoadBatch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ the corrupted batch."""
155155
sys.exit(exit_code)
156156
except UnboundLocalError:
157157
# If exit_code hasn't been set, then Houston, we've had a problem
158+
print('Error: exit code has not been set', flush=True)
158159
sys.exit(1)
159160

160161
def index(solr_url, batch_dir=None, replace=False, validate_only=False):

Model/lib/wdk/ApiCommon/geneQueries.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
from apidb.TextSearchableComment@COMMENT_DBLINK@ tsc,
9090
@COMMENT_SCHEMA@MappedComment@COMMENT_DBLINK@ mc
9191
where mc.comment_id = tsc.comment_id
92+
and tsc.comment_target_type = 'gene'
9293
and mc.review_status_id != 'rejected'
9394
and mc.is_visible = 1
9495
]]>
@@ -104,6 +105,7 @@
104105
from apidb.textsearchablecomment@COMMENT_DBLINK@ tsc,
105106
@COMMENT_SCHEMA@mappedComment@COMMENT_DBLINK@ mc
106107
where mc.comment_id = tsc.comment_id
108+
and tsc.comment_target_type = 'gene'
107109
and mc.review_status_id != 'rejected'
108110
and mc.is_visible = 1
109111
]]>

Model/lib/wdk/ApiCommon/sequenceQueries.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,39 @@
103103
</sql>
104104
</sqlQuery>
105105

106+
<!-- needed for commentupdater -->
107+
<sqlQuery name="UserCommentIDs">
108+
<column name="source_id"/>
109+
<column name="comment_id"/>
110+
<sql>
111+
<![CDATA[
112+
select tsc.source_id, tsc.comment_id
113+
from apidb.TextSearchableComment@COMMENT_DBLINK@ tsc,
114+
@COMMENT_SCHEMA@MappedComment@COMMENT_DBLINK@ mc
115+
where mc.comment_id = tsc.comment_id
116+
and tsc.comment_target_type = 'genome'
117+
and mc.review_status_id != 'rejected'
118+
and mc.is_visible = 1
119+
]]>
120+
</sql>
121+
</sqlQuery>
122+
123+
<sqlQuery name="UserCommentContent">
124+
<column name="source_id"/>
125+
<column name="comment_content"/>
126+
<sql>
127+
<![CDATA[
128+
select tsc.source_id, tsc.content
129+
from apidb.TextSearchableComment@COMMENT_DBLINK@ tsc,
130+
@COMMENT_SCHEMA@MappedComment@COMMENT_DBLINK@ mc
131+
where mc.comment_id = tsc.comment_id
132+
and tsc.comment_target_type = 'genome'
133+
and mc.review_status_id != 'rejected'
134+
and mc.is_visible = 1
135+
]]>
136+
</sql>
137+
</sqlQuery>
138+
106139
</querySet>
107140

108141
</wdkModel>

Model/lib/wdk/ApiCommon/siteSearchRecords.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,19 @@
151151
<columnAttribute name="organism"/>
152152
</table>
153153

154+
<!-- needed for the user comment updater. -->
155+
<table name="userCommentIds"
156+
internal="true"
157+
queryRef="SequenceTables.UserCommentIDs">
158+
<columnAttribute name="comment_id"/>
159+
</table>
160+
161+
<table name="userCommentContent"
162+
displayName="User Comments"
163+
queryRef="SequenceTables.UserCommentContent">
164+
<columnAttribute name="content"/>
165+
</table>
166+
154167
<table name="Aliases"
155168
displayName="Previous IDs and aliases"
156169
queryRef="SequenceTables.Aliases">

0 commit comments

Comments
 (0)