Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion snd/module.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Label: Structured Narrative Datasets
Description: Dynamically defined hierarchical datasets.
License: Apache 2.0
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
SupportedDatabases: mssql, pgsql
ManageVersion: true
13 changes: 4 additions & 9 deletions snd/resources/schemas/dbscripts/postgresql/snd-0.000-25.000.sql
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,8 @@ CREATE INDEX IDX_SND_EVENTSCACHE_CONTAINER ON snd.EventsCache(Container);
-- non-recursive CTE that is materialized once, then join to it in both the anchor and
-- recursive members. This produces a stable per-parent TreePath segment and avoids the
-- collisions and 3-char truncation that result from formatting raw SortOrder values.
-- This differs from the SQL Server twin (sqlserver/snd-0.000-25.000.sql), which uses an
-- unpartitioned ROW_NUMBER OVER (ORDER BY SortOrder); the partitioned form is preferred
-- and the MSSQL function should eventually be aligned. NULLS FIRST is used so a NULL
-- SortOrder sorts first within a parent, matching MSSQL's default NULL-ordering and the
-- prior PG behavior (COALESCE(SortOrder, 0)).
-- NULLS FIRST is used so a NULL SortOrder sorts first within a parent, matching the prior
-- PG behavior (COALESCE(SortOrder, 0)).
-- ==========================================================================================
CREATE FUNCTION snd.fGetSuperPkg(_pkgId INT)
RETURNS TABLE (
Expand Down Expand Up @@ -427,10 +424,8 @@ $$;
-- sub packages for each ProjectItem
-- ==========================================================================================
-- See note on fGetSuperPkg above re: pre-computed ordinals. The anchor uses an ordinal
-- ordered by (ProjectItemId, SuperPkgId), which matches the MSSQL anchor's ROW_NUMBER.
-- The recursive sub-tree uses per-parent ordinals over (SortOrder NULLS FIRST,
-- SuperPkgId) -- partitioned by ParentSuperPkgId, unlike MSSQL's unpartitioned form;
-- NULLS FIRST matches MSSQL's default NULL-ordering.
-- ordered by (ProjectItemId, SuperPkgId); the recursive sub-tree uses per-parent ordinals
-- over (SortOrder NULLS FIRST, SuperPkgId), partitioned by ParentSuperPkgId.
-- ==========================================================================================
CREATE FUNCTION snd.fGetProjectItems(_projectId INT, _revisionNum INT)
RETURNS TABLE (
Expand Down
587 changes: 0 additions & 587 deletions snd/resources/schemas/dbscripts/sqlserver/snd-0.000-25.000.sql

This file was deleted.

1 change: 0 additions & 1 deletion snprc_ehr/module.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ModuleClass: org.labkey.snprc_ehr.SNPRC_EHRModule
SupportedDatabases: mssql, pgsql
ManageVersion: true
License: Apache 2.0
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
1 change: 0 additions & 1 deletion snprc_ehr/resources/queries/ehr_lookups/AgeClassRanges.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ SELECT
age.species,
age.ageclass,

-- please excuse the ugly formatting - A sql server convert function would be helpful here!
case when (age."max" is NULL and age.label = 'Senior') then
(CAST(age."min" as VARCHAR(5) ) || case when (age."min"- FLOOR(age."min") > 0) then '' else '.0 - ' end)
ELSE
Expand Down
1 change: 0 additions & 1 deletion snprc_ehr/resources/queries/study/GenDemoCustomizer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Select d.Id,
d.species.arc_species_code as ARC_species,
*/
-- Cast boolean → integer first so the IFNULL result type is INTEGER, not BOOLEAN.
-- Both args matching as BOOLEAN triggers SQL Server's BIT→BOOLEAN CASE-wrap (error 4145);
-- mixing BOOLEAN with integer 0 fails on Postgres ("COALESCE types boolean and integer cannot be matched").
IFNULL(CAST(g.HasGeneExpressionData AS INTEGER), 0) as HasGeneExpressionData,
IFNULL(CAST(s.HasSNPData AS INTEGER), 0) as HasSNPData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ SELECT

FROM study.animal_group_members as agm
INNER JOIN snprc_ehr.animal_groups as ag ON ag.code = agm.groupId
-- SQL Server's default collation matched this case-insensitively; Postgres LIKE does not.
-- Postgres LIKE is case-sensitive.
INNER JOIN snprc_ehr.animal_group_categories as agc on ag.category_code = agc.category_code and lower(agc.description) like '%colonies%'
WHERE agm.isActive = true and agm.qcstate.PublicData = true and id.demographics.calculated_status = 'Alive'
Loading