archive - handle model sql files

This commit is contained in:
Jan Prochazka
2021-09-30 10:30:35 +02:00
parent 0be07ba093
commit c2feedac20
5 changed files with 130 additions and 42 deletions

View File

@@ -1,3 +1,15 @@
<script lang="ts" context="module">
const ARCHIVE_LABELS = {
jsonl: 'JSON table data',
'table.yaml': 'Tables',
'view.sql': 'Views',
'proce.sql': 'Procedures',
'func.sql': 'Functions',
'trigger.sql': 'Triggers',
'matview.sql': 'Materialized views',
};
</script>
<script lang="ts">
import _ from 'lodash';
@@ -32,7 +44,9 @@
list={($files || []).map(file => ({
fileName: file.name,
folderName: folder,
fileType: file.type,
}))}
groupFunc={data => ARCHIVE_LABELS[data.fileType] || 'Archive'}
module={archiveFileAppObject}
{filter}
/>