Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7451195
080.sql
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
631 B
Subscribers
None
080.sql
View Options
-- SWH DB schema upgrade
-- from_version: 79
-- to_version: 80
-- description: Permit to retrieve distinct batch of cache contents
insert
into
dbversion
(
version
,
release
,
description
)
values
(
80
,
now
(),
'Work In Progress'
);
create
or
replace
function
swh_cache_content_get_by_batch
(
last_content
bytea
,
batch_limit
bigint
)
returns
setof
content_signature
language
sql
stable
as
$$
SELECT
DISTINCT
c
.
sha1
,
c
.
sha1_git
,
c
.
sha256
FROM
cache_content_revision
ccr
INNER
JOIN
content
as
c
ON
ccr
.
content
=
c
.
sha1_git
WHERE
c
.
sha1
>
last_content
ORDER
BY
c
.
sha1
LIMIT
batch_limit
$$
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 17, 10:02 AM (5 d, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3239049
Attached To
rDSTOC swh-storage-cassandra
Event Timeline
Log In to Comment