@@ -344,14 +344,11 @@ public List<SlimAlleleVariantDomain> search(AlleleVariantDomain searchDomain) {
344344 Boolean from_reference = false ;
345345 Boolean from_alleleReferenceID = false ;
346346 Boolean from_alleleID = false ;
347-
348- //String select = "select distinct v._variant_key, a._allele_key, a.symbol, left(a.symbol, 1), substring(a.symbol, '\\d+')::int";
349- //String orderBy = "order by left(a.symbol, 1), substring(a.symbol, '\\d+')::int NULLS FIRST, a.symbol";
350347
351- // split the symbol into a prefixPart and a numericPart (see pgmgddbschema/procedure/ACC_split_create.object)
352- // set numericPart = integer so it will order correctly
353- String select = "with allele as (select distinct v._variant_key, a._allele_key, a.symbol, regexp_matches(split_part(a.symbol,'<',1), E'^((.*[^0-9])?)([0-9]*)', 'g') as symbolMatch" ;
354- String orderBy = ")\n select distinct _variant_key, _allele_key, symbol, symbolMatch[1], "
348+ // split the symbol into a prefixPart and a numericPart (see pgmgddbschema/procedure/ACC_split_create.object)
349+ // set numericPart = integer so it will order correctly
350+ String select = "with allele as (select distinct v._variant_key, a._allele_key, a.symbol, regexp_matches(split_part(a.symbol,'<',1), E'^((.*[^0-9])?)([0-9]*)', 'g') as symbolMatch" ;
351+ String orderBy = ")\n select distinct _variant_key, _allele_key, symbol, symbolMatch[1], "
355352 + "\n CASE"
356353 + "\n when symbolMatch[3] = '' then 0"
357354 + "\n when symbolMatch[3] != '' then symbolMatch[3]::integer"
0 commit comments