-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatasette.yml
27 lines (27 loc) · 913 Bytes
/
datasette.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Serve UI with:
# datasette serve -i path_to_artifacts.db -m datasette.yml
# This file is auto-updated from deploy.sh on every datasette restart
databases:
path_to_artifacts:
queries:
find_artifacts:
title: Find artifacts by full path (exact match)
params:
- path
sql: |-
SELECT artifact
FROM Artifacts, PathToArtifactIds, json_each('[' || PathToArtifactIds.artifact_ids || ']') as each_id
WHERE PathToArtifactIds.path = :path AND each_id.value = Artifacts.id
hide_sql: true
find_files:
title: Find full paths (match by path components)
params:
- path
sql: |-
SELECT path
FROM PathToArtifactIds_fts
WHERE PathToArtifactIds_fts MATCH escape_fts(:path)
ORDER BY bm25(PathToArtifactIds_fts)
LIMIT 100
hide_sql: true
allow_sql: false