@db-auto/dal
Advanced tools
Comparing version 0.0.23 to 0.0.24
import { DalResult, DalRow } from "./dal"; | ||
import { ColumnDefn, NameAnd } from "@db-auto/utils"; | ||
export interface DalResultDisplayOptions { | ||
json?: boolean; | ||
onelinejson?: boolean; | ||
} | ||
export declare function columnDefnFor(res: DalResult): NameAnd<ColumnDefn<DalRow>>; | ||
export declare function prettyPrintDalResult(res: DalResult, showTitles?: false): string[]; | ||
export declare function prettyPrintDalResult(options: DalResultDisplayOptions, res: DalResult, showTitles?: false): string[]; |
@@ -12,5 +12,9 @@ "use strict"; | ||
exports.columnDefnFor = columnDefnFor; | ||
function prettyPrintDalResult(res, showTitles) { | ||
function prettyPrintDalResult(options, res, showTitles) { | ||
if (options.json) | ||
return [JSON.stringify(res.rows, null, 2)]; | ||
if (options.onelinejson) | ||
return res.rows.map(row => JSON.stringify(row)); | ||
return (0, utils_1.toColumns)(columnDefnFor(res), showTitles)(res.rows); | ||
} | ||
exports.prettyPrintDalResult = prettyPrintDalResult; |
{ | ||
"name": "@db-auto/dal", | ||
"description": "", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"main": "dist/index", | ||
@@ -6,0 +6,0 @@ "types": "dist/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4994
9
79
1
3