IF Commons GitHub

sql/loads/extract

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0054-sql-loads FR-003

Extracts (commons data 0054-sql-loads): the rows of a typed select as CSV (RFC 4180, a header, null as an empty cell) or as lines of JSON. The text is returned and nothing is written, so that the caller puts it in a file, a response or a bucket; a CSV that is extracted is read again by fromCsv to the same rows.

Source: commons/data/sql/loads/extract.ts

2 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

extractCsvfunction
function extractCsv<R>(select: Select<Scope, R>, on: Runner): Promise<string>

CSV text of the rows of a select, with the keys of its row as the header.

Imported by 8 tests of the run (8 passed, 0 failed): the library's results

extractJsonLinesfunction
function extractJsonLines<R>(select: Select<Scope, R>, on: Runner): Promise<string>

Lines of JSON, one for each row of a select.

Imported by 8 tests of the run (8 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.