Skip to content

Commit d84d0ba

Browse files
committed
have a single products table, rather than preferredProducts and alternateProducts
1 parent ab90b2d commit d84d0ba

2 files changed

Lines changed: 33 additions & 10 deletions

File tree

Model/lib/wdk/ApiCommon/geneQueries.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,35 @@
412412
</sql>
413413
</sqlQuery>
414414

415+
<sqlQuery name="Products" isCacheable="false" >
416+
<column name="source_id"/>
417+
<column name="product"/>
418+
<sql>
419+
<![CDATA[
420+
select 'dots.GeneFeature' as source, source_id, product
421+
from dots.GeneFeature
422+
where product is not null
423+
union
424+
select 'dots.TranscriptFeature' as source, gf.source_id, t.product
425+
from dots.GeneFeature gf, dots.Transcript t
426+
where gf.na_feature_id = t.parent_id
427+
and t.product is not null
428+
union
429+
select 'apidb.GeneFeatureProduct' as source, gf.source_id, gfp.product
430+
from dots.GeneFeature gf, apidb.GeneFeatureProduct gfp
431+
where gfp.na_feature_id = gf.na_feature_id
432+
union
433+
select 'apidb.TranscriptProduct' as source, gf.source_id, tp.product
434+
from dots.GeneFeature gf, dots.Transcript t,
435+
apidb.TranscriptProduct tp
436+
where t.parent_id = gf.na_feature_id
437+
and tp.na_feature_id = t.na_feature_id
438+
]]>
439+
</sql>
440+
</sqlQuery>
441+
442+
443+
<!--
415444
<sqlQuery name="PreferredProducts" isCacheable="false" >
416445
<column name="source_id"/>
417446
<column name="transcript_ids"/>
@@ -518,6 +547,7 @@
518547
]]>
519548
</sql>
520549
</sqlQuery>
550+
-->
521551

522552
<sqlQuery name="gene_dbrefs">
523553
<column name="source_id"/>

Model/lib/wdk/ApiCommon/siteSearchRecords.xml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@
398398
<columnAttribute name="projectAux" displayName="dontcare" internal="true"/> <!-- special field used by Apollo Site Search Updater -->
399399
<columnAttribute displayName="Genomic sequence ID" name="sequence_id"/>
400400

401-
<columnAttribute name="product" displayName="Preferred product description" >
401+
<!-- all in products table columnAttribute name="product" displayName="Preferred product description" !-->
402402
<propertyList name="isSubtitle">
403403
<value>true</value>
404404
</propertyList>
@@ -562,22 +562,15 @@
562562
<columnAttribute name="ortho_name"/> <!-- gene name -->
563563
</table>
564564

565-
<table name="PreferredProducts"
565+
<table name="Products"
566566
displayName="Product descriptions"
567-
queryRef="GeneTables.PreferredProducts">
567+
queryRef="GeneTables.Products">
568568
<propertyList name="boost">
569569
<value>1.5</value>
570570
</propertyList>
571571
<columnAttribute name="product"/>
572572
</table>
573573

574-
<table name="AlternateProducts"
575-
displayName="Alternate product descriptions"
576-
queryRef="GeneTables.AlternateProducts">
577-
<columnAttribute name="product"/>
578-
<columnAttribute name="reference"/>
579-
</table>
580-
581574
<table name="RodMalPhenotype"
582575
displayName="Rodent malaria phenotype"
583576
queryRef="GeneTables.RodMalPhenotype">

0 commit comments

Comments
 (0)