Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7450874
040.sql
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
553 B
Subscribers
None
040.sql
View Options
-- SWH DB schema upgrade
-- from_version: 39
-- to_version: 40
-- description: Open entity get by uuid
insert
into
dbversion
(
version
,
release
,
description
)
values
(
40
,
now
(),
'Work In Progress'
);
create
or
replace
function
swh_entity_get
(
entity_uuid
uuid
)
returns
setof
entity
language
sql
stable
as
$$
with
recursive
entity_hierarchy
as
(
select
e
.
*
from
entity
e
where
uuid
=
entity_uuid
union
select
p
.
*
from
entity_hierarchy
e
join
entity
p
on
e
.
parent
=
p
.
uuid
)
select
*
from
entity_hierarchy
;
$$
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 17, 8:59 AM (4 d, 22 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3245547
Attached To
rDSTOC swh-storage-cassandra
Event Timeline
Log In to Comment