Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
04dcd8ee
Verified
Commit
04dcd8ee
authored
3 years ago
by
Erwan Rouchet
Browse files
Options
Downloads
Patches
Plain Diff
Filter worker versions
parent
3199091d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/documents/export/__init__.py
+20
-1
20 additions, 1 deletion
arkindex/documents/export/__init__.py
with
20 additions
and
1 deletion
arkindex/documents/export/__init__.py
+
20
−
1
View file @
04dcd8ee
...
...
@@ -27,12 +27,31 @@ EXPORT_QUERIES = [(
"""
),
(
'
worker_version
'
,
# TODO: Filter worker versions properly
"""
SELECT version.id, worker.name, worker.slug, worker.type, revision.hash
FROM dataimport_workerversion version
INNER JOIN dataimport_worker worker ON (version.worker_id = worker.id)
INNER JOIN dataimport_revision revision ON (version.revision_id = revision.id)
WHERE version.id IN (
SELECT worker_version_id FROM documents_element WHERE corpus_id =
'
{corpus_id}
'
::uuid
UNION
SELECT worker_version_id FROM documents_entity WHERE corpus_id =
'
{corpus_id}
'
::uuid
UNION
SELECT classification.worker_version_id
FROM documents_classification classification
INNER JOIN documents_element element ON (element.id = classification.element_id)
WHERE element.corpus_id =
'
{corpus_id}
'
::uuid
UNION
SELECT transcription.worker_version_id
FROM documents_transcription transcription
INNER JOIN documents_element element ON (element.id = transcription.element_id)
WHERE element.corpus_id =
'
{corpus_id}
'
::uuid
UNION
SELECT te.worker_version_id
FROM documents_transcriptionentity te
INNER JOIN documents_entity entity ON (te.entity_id = entity.id)
WHERE entity.corpus_id =
'
{corpus_id}
'
::uuid
)
"""
),
(
'
element
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment