mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
6ab782f385
commit
f561fb0ce4
|
@ -9,7 +9,7 @@ fixme-prefix TODO:
|
||||||
fixme-prefix PR:
|
fixme-prefix PR:
|
||||||
fixme-prefix REVIEW:
|
fixme-prefix REVIEW:
|
||||||
|
|
||||||
fixme-git-scan-filter-days 100
|
fixme-git-scan-filter-days 365
|
||||||
|
|
||||||
fixme-attribs assigned workflow
|
fixme-attribs assigned workflow
|
||||||
|
|
||||||
|
|
|
@ -142,22 +142,48 @@ createTables = do
|
||||||
|
|
||||||
ddl [qc| drop view if exists fixmeattrview |]
|
ddl [qc| drop view if exists fixmeattrview |]
|
||||||
|
|
||||||
|
let commits = [qc|name in ('commit','committer','committer-name','committer-email','commit-time')|] :: Text
|
||||||
|
|
||||||
ddl [qc|
|
ddl [qc|
|
||||||
create view fixmeattrview as
|
create view fixmeattrview as
|
||||||
with ranked as (
|
with ranked1 as (
|
||||||
select
|
select
|
||||||
fixme,
|
fixme,
|
||||||
name,
|
name,
|
||||||
value,
|
value,
|
||||||
row_number() over (partition by fixme, name order by ts desc nulls first) as rn
|
row_number() over (partition by fixme, name order by ts desc nulls first) as rn
|
||||||
from fixmeattr
|
from fixmeattr
|
||||||
|
where not ({commits})
|
||||||
|
),
|
||||||
|
ranked2 as (
|
||||||
|
select
|
||||||
|
fixme,
|
||||||
|
name,
|
||||||
|
value,
|
||||||
|
row_number() over (partition by fixme, name order by ts asc nulls last) as rn
|
||||||
|
from fixmeattr
|
||||||
|
where ({commits})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
select distinct fixme,name,value
|
||||||
|
from
|
||||||
|
(
|
||||||
select
|
select
|
||||||
fixme,
|
fixme,
|
||||||
name,
|
name,
|
||||||
value
|
value
|
||||||
from ranked
|
from ranked1
|
||||||
where rn = 1;
|
where rn = 1
|
||||||
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select
|
||||||
|
fixme,
|
||||||
|
name,
|
||||||
|
value
|
||||||
|
from ranked2
|
||||||
|
where rn = 1
|
||||||
|
)
|
||||||
|]
|
|]
|
||||||
|
|
||||||
ddl [qc|drop view if exists fixmeactualview|]
|
ddl [qc|drop view if exists fixmeactualview|]
|
||||||
|
|
Loading…
Reference in New Issue