ndjson direct support

This commit is contained in:
Jan Prochazka
2022-03-27 20:35:30 +02:00
parent a20a34680d
commit 7c0f33383f
5 changed files with 34 additions and 7 deletions

View File

@@ -3,7 +3,8 @@ import { FileFormatDefinition, QuickExportDefinition } from 'dbgate-types';
const jsonlFormat = {
storageType: 'jsonl',
extension: 'jsonl',
name: 'JSON lines',
extensions: ['jsonl', 'ndjson'],
name: 'JSON lines/NDJSON',
readerFunc: 'jsonLinesReader',
writerFunc: 'jsonLinesWriter',
};
@@ -23,7 +24,7 @@ const sqlFormat = {
};
const jsonlQuickExport = {
label: 'JSON lines',
label: 'JSON lines/NDJSON',
extension: 'jsonl',
createWriter: fileName => ({
functionName: 'jsonLinesWriter',