@toiroakr/lines-db 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/bin/cli.js +91 -34
- package/dist/index.cjs +39 -7
- package/dist/index.d.cts +9 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +118 -55
- package/src/database.ts +71 -11
- package/src/index.ts +1 -0
- package/src/schema-extensions.ts +1 -4
- package/src/type-generator.ts +4 -3
- package/src/types.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @toiroakr/lines-db
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c408b92: feat: display per-table validation results for directory validation
|
|
8
|
+
|
|
9
|
+
The `validate` command now shows individual results per table when validating a directory, including record counts for successful tables (e.g., `✓ users (3 records)`).
|
|
10
|
+
- Added `TableValidationResult` type and `tableResults` field to `ValidationResult`
|
|
11
|
+
- Each table result includes `tableName`, `valid`, `rowCount`, `errors`, and `warnings`
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- e61a4ee: fix: gracefully handle foreign key validation when referenced table has errors
|
|
16
|
+
|
|
17
|
+
When validating a directory, if a table had validation errors, any table referencing it via foreign key would crash with a misleading `no such table` SQLite error. Now, foreign key constraints to failed tables are skipped with a clear warning (e.g., `⚠ Skipping foreign key validation for table 'child': referenced table 'parent' has validation errors`), and the child table's own schema validation still runs normally.
|
|
18
|
+
|
|
3
19
|
## 0.7.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/bin/cli.js
CHANGED
|
@@ -423,6 +423,7 @@ var LinesDB = class LinesDB {
|
|
|
423
423
|
async initialize(options) {
|
|
424
424
|
const allErrors = [];
|
|
425
425
|
const allWarnings = [];
|
|
426
|
+
const allRowCounts = /* @__PURE__ */ new Map();
|
|
426
427
|
const tableName = options?.tableName;
|
|
427
428
|
const detailedValidate = options?.detailedValidate ?? false;
|
|
428
429
|
const transform = options?.transform;
|
|
@@ -434,14 +435,27 @@ var LinesDB = class LinesDB {
|
|
|
434
435
|
const attemptedTables = /* @__PURE__ */ new Set();
|
|
435
436
|
for (const tableNameToLoad of tablesToLoad) if (!attemptedTables.has(tableNameToLoad)) {
|
|
436
437
|
const tableTransform = tableNameToLoad === tableName ? transform : void 0;
|
|
437
|
-
const { errors, warnings } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
438
|
+
const { errors, warnings, rowCounts: tableRowCounts } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
438
439
|
allErrors.push(...errors);
|
|
439
440
|
allWarnings.push(...warnings);
|
|
441
|
+
for (const [k, v] of tableRowCounts) allRowCounts.set(k, v);
|
|
440
442
|
}
|
|
443
|
+
const tableResults = tablesToLoad.map((name) => {
|
|
444
|
+
const tableErrors = allErrors.filter((e) => e.tableName === name);
|
|
445
|
+
const tableWarnings = allWarnings.filter((w) => w.includes(`'${name}'`));
|
|
446
|
+
return {
|
|
447
|
+
tableName: name,
|
|
448
|
+
valid: tableErrors.length === 0,
|
|
449
|
+
rowCount: allRowCounts.get(name) ?? 0,
|
|
450
|
+
errors: tableErrors,
|
|
451
|
+
warnings: tableWarnings
|
|
452
|
+
};
|
|
453
|
+
});
|
|
441
454
|
return {
|
|
442
455
|
valid: allErrors.length === 0,
|
|
443
456
|
errors: allErrors,
|
|
444
|
-
warnings: allWarnings
|
|
457
|
+
warnings: allWarnings,
|
|
458
|
+
tableResults
|
|
445
459
|
};
|
|
446
460
|
}
|
|
447
461
|
/**
|
|
@@ -450,9 +464,11 @@ var LinesDB = class LinesDB {
|
|
|
450
464
|
async loadTableWithDependencies(tableName, loadedTables, loadingTables, attemptedTables, detailedValidate, transform) {
|
|
451
465
|
const errors = [];
|
|
452
466
|
const warnings = [];
|
|
467
|
+
const rowCounts = /* @__PURE__ */ new Map();
|
|
453
468
|
if (attemptedTables.has(tableName)) return {
|
|
454
469
|
errors,
|
|
455
|
-
warnings
|
|
470
|
+
warnings,
|
|
471
|
+
rowCounts
|
|
456
472
|
};
|
|
457
473
|
attemptedTables.add(tableName);
|
|
458
474
|
if (loadingTables.has(tableName)) throw new Error(`Circular dependency detected for table '${tableName}'`);
|
|
@@ -476,10 +492,21 @@ var LinesDB = class LinesDB {
|
|
|
476
492
|
const depResult = await this.loadTableWithDependencies(referencedTable, loadedTables, loadingTables, attemptedTables, detailedValidate, void 0);
|
|
477
493
|
errors.push(...depResult.errors);
|
|
478
494
|
warnings.push(...depResult.warnings);
|
|
495
|
+
for (const [k, v] of depResult.rowCounts) rowCounts.set(k, v);
|
|
479
496
|
} else throw new Error(`Foreign key reference to non-existent table '${referencedTable}' in table '${tableName}'`);
|
|
480
497
|
}
|
|
481
|
-
const
|
|
498
|
+
const failedDependencies = /* @__PURE__ */ new Set();
|
|
499
|
+
if (foreignKeys && foreignKeys.length > 0) {
|
|
500
|
+
for (const fk of foreignKeys) {
|
|
501
|
+
const referencedTable = fk.references.table;
|
|
502
|
+
if (referencedTable === tableName) continue;
|
|
503
|
+
if (attemptedTables.has(referencedTable) && !loadedTables.has(referencedTable)) failedDependencies.add(referencedTable);
|
|
504
|
+
}
|
|
505
|
+
if (failedDependencies.size > 0) for (const dep of failedDependencies) warnings.push(`Skipping foreign key validation for table '${tableName}': referenced table '${dep}' has validation errors`);
|
|
506
|
+
}
|
|
507
|
+
const { loaded, rowCount, errors: loadErrors } = await this.loadTable(tableName, tableConfig, detailedValidate, transform, failedDependencies);
|
|
482
508
|
errors.push(...loadErrors);
|
|
509
|
+
rowCounts.set(tableName, rowCount);
|
|
483
510
|
if (loaded) loadedTables.add(tableName);
|
|
484
511
|
else {
|
|
485
512
|
warnings.push(`Table '${tableName}' was not loaded (no data or skipped)`);
|
|
@@ -490,14 +517,15 @@ var LinesDB = class LinesDB {
|
|
|
490
517
|
}
|
|
491
518
|
return {
|
|
492
519
|
errors,
|
|
493
|
-
warnings
|
|
520
|
+
warnings,
|
|
521
|
+
rowCounts
|
|
494
522
|
};
|
|
495
523
|
}
|
|
496
524
|
/**
|
|
497
525
|
* Load a single table from JSONL file
|
|
498
526
|
* @returns Object with loaded status and validation errors
|
|
499
527
|
*/
|
|
500
|
-
async loadTable(tableName, config, detailedValidate, transform) {
|
|
528
|
+
async loadTable(tableName, config, detailedValidate, transform, failedDependencies) {
|
|
501
529
|
let data = await JsonlReader.read(config.jsonlPath);
|
|
502
530
|
if (transform) data = data.map((row) => transform(row));
|
|
503
531
|
let validationSchema = config.validationSchema;
|
|
@@ -552,6 +580,7 @@ var LinesDB = class LinesDB {
|
|
|
552
580
|
}));
|
|
553
581
|
if (validationErrors.length > 0) return {
|
|
554
582
|
loaded: false,
|
|
583
|
+
rowCount: data.length,
|
|
555
584
|
errors: validationErrorDetails
|
|
556
585
|
};
|
|
557
586
|
let schema;
|
|
@@ -566,6 +595,7 @@ var LinesDB = class LinesDB {
|
|
|
566
595
|
} else if (config.autoInferSchema !== false) {
|
|
567
596
|
if (validatedData.length === 0) return {
|
|
568
597
|
loaded: false,
|
|
598
|
+
rowCount: 0,
|
|
569
599
|
errors: []
|
|
570
600
|
};
|
|
571
601
|
schema = inferredSchema;
|
|
@@ -581,7 +611,7 @@ var LinesDB = class LinesDB {
|
|
|
581
611
|
const idColumn = schema.columns.find((c) => c.name === "id");
|
|
582
612
|
if (idColumn) idColumn.primaryKey = true;
|
|
583
613
|
}
|
|
584
|
-
if (foreignKeys) schema.foreignKeys = foreignKeys;
|
|
614
|
+
if (foreignKeys) schema.foreignKeys = failedDependencies && failedDependencies.size > 0 ? foreignKeys.filter((fk) => !failedDependencies.has(fk.references.table)) : foreignKeys;
|
|
585
615
|
if (indexes) {
|
|
586
616
|
schema.indexes = indexes;
|
|
587
617
|
for (const index of indexes) if (index.unique && index.columns.length === 1) {
|
|
@@ -595,11 +625,13 @@ var LinesDB = class LinesDB {
|
|
|
595
625
|
const insertErrors = this.insertDataWithDetailedValidation(tableName, schema, validatedData, config.jsonlPath);
|
|
596
626
|
if (insertErrors.length > 0) return {
|
|
597
627
|
loaded: false,
|
|
628
|
+
rowCount: data.length,
|
|
598
629
|
errors: insertErrors
|
|
599
630
|
};
|
|
600
631
|
} else this.insertData(tableName, schema, validatedData);
|
|
601
632
|
return {
|
|
602
633
|
loaded: true,
|
|
634
|
+
rowCount: data.length,
|
|
603
635
|
errors: []
|
|
604
636
|
};
|
|
605
637
|
}
|
|
@@ -1353,48 +1385,73 @@ program.command("validate").description("Validate JSONL file(s) against schema")
|
|
|
1353
1385
|
} finally {
|
|
1354
1386
|
await db.close();
|
|
1355
1387
|
}
|
|
1356
|
-
if (
|
|
1357
|
-
for (const warning of result.warnings) console.warn(styleText("yellow", `⚠ ${warning}`));
|
|
1358
|
-
console.log("");
|
|
1359
|
-
}
|
|
1360
|
-
if (result.valid) {
|
|
1361
|
-
console.log("✓ All records are valid");
|
|
1362
|
-
process.exit(0);
|
|
1363
|
-
} else {
|
|
1388
|
+
if (!tableName) {
|
|
1364
1389
|
const formatter = new ErrorFormatter({ verbose: options.verbose });
|
|
1365
|
-
const
|
|
1366
|
-
for (const
|
|
1367
|
-
|
|
1368
|
-
fileErrors.
|
|
1369
|
-
|
|
1370
|
-
}
|
|
1371
|
-
for (const [file, fileErrors] of errorsByFile) {
|
|
1372
|
-
console.error(formatter.formatErrorHeader(fileErrors.length, file));
|
|
1390
|
+
for (const tableResult of result.tableResults) if (tableResult.valid && tableResult.warnings.length === 0) console.log(styleText("green", `✓ ${tableResult.tableName} (${tableResult.rowCount} records)`));
|
|
1391
|
+
else if (tableResult.valid && tableResult.warnings.length > 0) for (const warning of tableResult.warnings) console.warn(styleText("yellow", `⚠ ${warning}`));
|
|
1392
|
+
else {
|
|
1393
|
+
const fileErrors = tableResult.errors;
|
|
1394
|
+
console.error(formatter.formatErrorHeader(fileErrors.length, fileErrors[0]?.file));
|
|
1373
1395
|
console.error("");
|
|
1374
1396
|
const validationErrors = fileErrors.filter((e) => e.type !== "foreignKey" || !e.foreignKeyError);
|
|
1375
1397
|
const foreignKeyErrors = fileErrors.filter((e) => e.type === "foreignKey" && e.foreignKeyError);
|
|
1376
|
-
if (validationErrors.length > 0) {
|
|
1377
|
-
|
|
1398
|
+
if (validationErrors.length > 0) console.error(formatter.formatValidationErrors(validationErrors.map((e) => ({
|
|
1399
|
+
file: e.file,
|
|
1400
|
+
rowIndex: e.rowIndex,
|
|
1401
|
+
issues: e.issues
|
|
1402
|
+
}))));
|
|
1403
|
+
for (const error of foreignKeyErrors) if (error.foreignKeyError) console.error(formatter.formatForeignKeyError({
|
|
1404
|
+
file: error.file,
|
|
1405
|
+
rowIndex: error.rowIndex,
|
|
1406
|
+
column: error.foreignKeyError.column,
|
|
1407
|
+
value: error.foreignKeyError.value,
|
|
1408
|
+
referencedTable: error.foreignKeyError.referencedTable,
|
|
1409
|
+
referencedColumn: error.foreignKeyError.referencedColumn
|
|
1410
|
+
}));
|
|
1411
|
+
console.error("");
|
|
1412
|
+
}
|
|
1413
|
+
if (result.valid) {
|
|
1414
|
+
console.log("");
|
|
1415
|
+
console.log(styleText("green", "✓ All records are valid"));
|
|
1416
|
+
process.exit(0);
|
|
1417
|
+
} else process.exit(1);
|
|
1418
|
+
} else {
|
|
1419
|
+
if (result.warnings.length > 0) {
|
|
1420
|
+
for (const warning of result.warnings) console.warn(styleText("yellow", `⚠ ${warning}`));
|
|
1421
|
+
console.log("");
|
|
1422
|
+
}
|
|
1423
|
+
if (result.valid) {
|
|
1424
|
+
console.log(styleText("green", "✓ All records are valid"));
|
|
1425
|
+
process.exit(0);
|
|
1426
|
+
} else {
|
|
1427
|
+
const formatter = new ErrorFormatter({ verbose: options.verbose });
|
|
1428
|
+
for (const [, fileErrors] of result.errors.reduce((map, error) => {
|
|
1429
|
+
const errors = map.get(error.file) || [];
|
|
1430
|
+
errors.push(error);
|
|
1431
|
+
map.set(error.file, errors);
|
|
1432
|
+
return map;
|
|
1433
|
+
}, /* @__PURE__ */ new Map())) {
|
|
1434
|
+
console.error(formatter.formatErrorHeader(fileErrors.length, fileErrors[0]?.file));
|
|
1435
|
+
console.error("");
|
|
1436
|
+
const validationErrors = fileErrors.filter((e) => e.type !== "foreignKey" || !e.foreignKeyError);
|
|
1437
|
+
const foreignKeyErrors = fileErrors.filter((e) => e.type === "foreignKey" && e.foreignKeyError);
|
|
1438
|
+
if (validationErrors.length > 0) console.error(formatter.formatValidationErrors(validationErrors.map((e) => ({
|
|
1378
1439
|
file: e.file,
|
|
1379
1440
|
rowIndex: e.rowIndex,
|
|
1380
1441
|
issues: e.issues
|
|
1381
|
-
})));
|
|
1382
|
-
console.error(
|
|
1383
|
-
}
|
|
1384
|
-
for (const error of foreignKeyErrors) if (error.foreignKeyError) {
|
|
1385
|
-
const formattedFk = formatter.formatForeignKeyError({
|
|
1442
|
+
}))));
|
|
1443
|
+
for (const error of foreignKeyErrors) if (error.foreignKeyError) console.error(formatter.formatForeignKeyError({
|
|
1386
1444
|
file: error.file,
|
|
1387
1445
|
rowIndex: error.rowIndex,
|
|
1388
1446
|
column: error.foreignKeyError.column,
|
|
1389
1447
|
value: error.foreignKeyError.value,
|
|
1390
1448
|
referencedTable: error.foreignKeyError.referencedTable,
|
|
1391
1449
|
referencedColumn: error.foreignKeyError.referencedColumn
|
|
1392
|
-
});
|
|
1393
|
-
console.error(
|
|
1450
|
+
}));
|
|
1451
|
+
console.error("");
|
|
1394
1452
|
}
|
|
1395
|
-
|
|
1453
|
+
process.exit(1);
|
|
1396
1454
|
}
|
|
1397
|
-
process.exit(1);
|
|
1398
1455
|
}
|
|
1399
1456
|
} catch (error) {
|
|
1400
1457
|
console.error("Error:", error instanceof Error ? error.message : String(error));
|
package/dist/index.cjs
CHANGED
|
@@ -396,6 +396,7 @@ var LinesDB = class LinesDB {
|
|
|
396
396
|
async initialize(options) {
|
|
397
397
|
const allErrors = [];
|
|
398
398
|
const allWarnings = [];
|
|
399
|
+
const allRowCounts = /* @__PURE__ */ new Map();
|
|
399
400
|
const tableName = options?.tableName;
|
|
400
401
|
const detailedValidate = options?.detailedValidate ?? false;
|
|
401
402
|
const transform = options?.transform;
|
|
@@ -407,14 +408,27 @@ var LinesDB = class LinesDB {
|
|
|
407
408
|
const attemptedTables = /* @__PURE__ */ new Set();
|
|
408
409
|
for (const tableNameToLoad of tablesToLoad) if (!attemptedTables.has(tableNameToLoad)) {
|
|
409
410
|
const tableTransform = tableNameToLoad === tableName ? transform : void 0;
|
|
410
|
-
const { errors, warnings } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
411
|
+
const { errors, warnings, rowCounts: tableRowCounts } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
411
412
|
allErrors.push(...errors);
|
|
412
413
|
allWarnings.push(...warnings);
|
|
414
|
+
for (const [k, v] of tableRowCounts) allRowCounts.set(k, v);
|
|
413
415
|
}
|
|
416
|
+
const tableResults = tablesToLoad.map((name) => {
|
|
417
|
+
const tableErrors = allErrors.filter((e) => e.tableName === name);
|
|
418
|
+
const tableWarnings = allWarnings.filter((w) => w.includes(`'${name}'`));
|
|
419
|
+
return {
|
|
420
|
+
tableName: name,
|
|
421
|
+
valid: tableErrors.length === 0,
|
|
422
|
+
rowCount: allRowCounts.get(name) ?? 0,
|
|
423
|
+
errors: tableErrors,
|
|
424
|
+
warnings: tableWarnings
|
|
425
|
+
};
|
|
426
|
+
});
|
|
414
427
|
return {
|
|
415
428
|
valid: allErrors.length === 0,
|
|
416
429
|
errors: allErrors,
|
|
417
|
-
warnings: allWarnings
|
|
430
|
+
warnings: allWarnings,
|
|
431
|
+
tableResults
|
|
418
432
|
};
|
|
419
433
|
}
|
|
420
434
|
/**
|
|
@@ -423,9 +437,11 @@ var LinesDB = class LinesDB {
|
|
|
423
437
|
async loadTableWithDependencies(tableName, loadedTables, loadingTables, attemptedTables, detailedValidate, transform) {
|
|
424
438
|
const errors = [];
|
|
425
439
|
const warnings = [];
|
|
440
|
+
const rowCounts = /* @__PURE__ */ new Map();
|
|
426
441
|
if (attemptedTables.has(tableName)) return {
|
|
427
442
|
errors,
|
|
428
|
-
warnings
|
|
443
|
+
warnings,
|
|
444
|
+
rowCounts
|
|
429
445
|
};
|
|
430
446
|
attemptedTables.add(tableName);
|
|
431
447
|
if (loadingTables.has(tableName)) throw new Error(`Circular dependency detected for table '${tableName}'`);
|
|
@@ -449,10 +465,21 @@ var LinesDB = class LinesDB {
|
|
|
449
465
|
const depResult = await this.loadTableWithDependencies(referencedTable, loadedTables, loadingTables, attemptedTables, detailedValidate, void 0);
|
|
450
466
|
errors.push(...depResult.errors);
|
|
451
467
|
warnings.push(...depResult.warnings);
|
|
468
|
+
for (const [k, v] of depResult.rowCounts) rowCounts.set(k, v);
|
|
452
469
|
} else throw new Error(`Foreign key reference to non-existent table '${referencedTable}' in table '${tableName}'`);
|
|
453
470
|
}
|
|
454
|
-
const
|
|
471
|
+
const failedDependencies = /* @__PURE__ */ new Set();
|
|
472
|
+
if (foreignKeys && foreignKeys.length > 0) {
|
|
473
|
+
for (const fk of foreignKeys) {
|
|
474
|
+
const referencedTable = fk.references.table;
|
|
475
|
+
if (referencedTable === tableName) continue;
|
|
476
|
+
if (attemptedTables.has(referencedTable) && !loadedTables.has(referencedTable)) failedDependencies.add(referencedTable);
|
|
477
|
+
}
|
|
478
|
+
if (failedDependencies.size > 0) for (const dep of failedDependencies) warnings.push(`Skipping foreign key validation for table '${tableName}': referenced table '${dep}' has validation errors`);
|
|
479
|
+
}
|
|
480
|
+
const { loaded, rowCount, errors: loadErrors } = await this.loadTable(tableName, tableConfig, detailedValidate, transform, failedDependencies);
|
|
455
481
|
errors.push(...loadErrors);
|
|
482
|
+
rowCounts.set(tableName, rowCount);
|
|
456
483
|
if (loaded) loadedTables.add(tableName);
|
|
457
484
|
else {
|
|
458
485
|
warnings.push(`Table '${tableName}' was not loaded (no data or skipped)`);
|
|
@@ -463,14 +490,15 @@ var LinesDB = class LinesDB {
|
|
|
463
490
|
}
|
|
464
491
|
return {
|
|
465
492
|
errors,
|
|
466
|
-
warnings
|
|
493
|
+
warnings,
|
|
494
|
+
rowCounts
|
|
467
495
|
};
|
|
468
496
|
}
|
|
469
497
|
/**
|
|
470
498
|
* Load a single table from JSONL file
|
|
471
499
|
* @returns Object with loaded status and validation errors
|
|
472
500
|
*/
|
|
473
|
-
async loadTable(tableName, config, detailedValidate, transform) {
|
|
501
|
+
async loadTable(tableName, config, detailedValidate, transform, failedDependencies) {
|
|
474
502
|
let data = await JsonlReader.read(config.jsonlPath);
|
|
475
503
|
if (transform) data = data.map((row) => transform(row));
|
|
476
504
|
let validationSchema = config.validationSchema;
|
|
@@ -525,6 +553,7 @@ var LinesDB = class LinesDB {
|
|
|
525
553
|
}));
|
|
526
554
|
if (validationErrors.length > 0) return {
|
|
527
555
|
loaded: false,
|
|
556
|
+
rowCount: data.length,
|
|
528
557
|
errors: validationErrorDetails
|
|
529
558
|
};
|
|
530
559
|
let schema;
|
|
@@ -539,6 +568,7 @@ var LinesDB = class LinesDB {
|
|
|
539
568
|
} else if (config.autoInferSchema !== false) {
|
|
540
569
|
if (validatedData.length === 0) return {
|
|
541
570
|
loaded: false,
|
|
571
|
+
rowCount: 0,
|
|
542
572
|
errors: []
|
|
543
573
|
};
|
|
544
574
|
schema = inferredSchema;
|
|
@@ -554,7 +584,7 @@ var LinesDB = class LinesDB {
|
|
|
554
584
|
const idColumn = schema.columns.find((c) => c.name === "id");
|
|
555
585
|
if (idColumn) idColumn.primaryKey = true;
|
|
556
586
|
}
|
|
557
|
-
if (foreignKeys) schema.foreignKeys = foreignKeys;
|
|
587
|
+
if (foreignKeys) schema.foreignKeys = failedDependencies && failedDependencies.size > 0 ? foreignKeys.filter((fk) => !failedDependencies.has(fk.references.table)) : foreignKeys;
|
|
558
588
|
if (indexes) {
|
|
559
589
|
schema.indexes = indexes;
|
|
560
590
|
for (const index of indexes) if (index.unique && index.columns.length === 1) {
|
|
@@ -568,11 +598,13 @@ var LinesDB = class LinesDB {
|
|
|
568
598
|
const insertErrors = this.insertDataWithDetailedValidation(tableName, schema, validatedData, config.jsonlPath);
|
|
569
599
|
if (insertErrors.length > 0) return {
|
|
570
600
|
loaded: false,
|
|
601
|
+
rowCount: data.length,
|
|
571
602
|
errors: insertErrors
|
|
572
603
|
};
|
|
573
604
|
} else this.insertData(tableName, schema, validatedData);
|
|
574
605
|
return {
|
|
575
606
|
loaded: true,
|
|
607
|
+
rowCount: data.length,
|
|
576
608
|
errors: []
|
|
577
609
|
};
|
|
578
610
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -29,10 +29,18 @@ type StandardSchemaResult<Output> = StandardSchemaV1.Result<Output>;
|
|
|
29
29
|
type StandardSchemaIssue = StandardSchemaV1.Issue;
|
|
30
30
|
type InferInput<T$1> = T$1 extends StandardSchemaV1<infer I, unknown> ? I : never;
|
|
31
31
|
type InferOutput<T$1> = T$1 extends StandardSchemaV1<unknown, infer O> ? O : never;
|
|
32
|
+
interface TableValidationResult {
|
|
33
|
+
tableName: string;
|
|
34
|
+
valid: boolean;
|
|
35
|
+
rowCount: number;
|
|
36
|
+
errors: ValidationErrorDetail[];
|
|
37
|
+
warnings: string[];
|
|
38
|
+
}
|
|
32
39
|
interface ValidationResult {
|
|
33
40
|
valid: boolean;
|
|
34
41
|
errors: ValidationErrorDetail[];
|
|
35
42
|
warnings: string[];
|
|
43
|
+
tableResults: TableValidationResult[];
|
|
36
44
|
}
|
|
37
45
|
interface ValidationErrorDetail {
|
|
38
46
|
file: string;
|
|
@@ -527,5 +535,5 @@ type RuntimeEnvironment = 'node' | 'unknown';
|
|
|
527
535
|
declare function detectRuntime(): RuntimeEnvironment;
|
|
528
536
|
declare const RUNTIME: RuntimeEnvironment;
|
|
529
537
|
//#endregion
|
|
530
|
-
export { type BiDirectionalSchema, type ColumnDefinition, type DatabaseConfig, DirectoryScanner, type ForeignKeyDefinition, type IndexDefinition, type InferInput, type InferOutput, type JsonArray, type JsonObject, type JsonValue, JsonlReader, JsonlWriter, LinesDB, RUNTIME, type RuntimeEnvironment, SCHEMA_EXTENSIONS, type SQLiteDatabase, type SQLiteStatement, type SchemaExtension, SchemaLoader, type SchemaOptions, type StandardSchema, type StandardSchemaIssue, type StandardSchemaResult, type Table, type TableConfig, type TableDefs, type TableSchema, type TableValidationOptions, TypeGenerator, type TypeGeneratorOptions, type ValidationError, type ValidationErrorDetail, type ValidationResult, defineSchema, detectRuntime, ensureTableRowsValid, extractTableNameFromSchemaFile, findSchemaFile, hasBackward, isSchemaFile, rewriteExtensionForImport };
|
|
538
|
+
export { type BiDirectionalSchema, type ColumnDefinition, type DatabaseConfig, DirectoryScanner, type ForeignKeyDefinition, type IndexDefinition, type InferInput, type InferOutput, type JsonArray, type JsonObject, type JsonValue, JsonlReader, JsonlWriter, LinesDB, RUNTIME, type RuntimeEnvironment, SCHEMA_EXTENSIONS, type SQLiteDatabase, type SQLiteStatement, type SchemaExtension, SchemaLoader, type SchemaOptions, type StandardSchema, type StandardSchemaIssue, type StandardSchemaResult, type Table, type TableConfig, type TableDefs, type TableSchema, type TableValidationOptions, type TableValidationResult, TypeGenerator, type TypeGeneratorOptions, type ValidationError, type ValidationErrorDetail, type ValidationResult, defineSchema, detectRuntime, ensureTableRowsValid, extractTableNameFromSchemaFile, findSchemaFile, hasBackward, isSchemaFile, rewriteExtensionForImport };
|
|
531
539
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/sqlite-adapter.ts","../src/types.ts","../src/database.ts","../src/jsonl-reader.ts","../src/jsonl-writer.ts","../src/schema-loader.ts","../src/directory-scanner.ts","../src/schema.ts","../src/type-generator.ts","../src/jsonl-migration.ts","../src/schema-extensions.ts","../src/runtime.ts"],"sourcesContent":[],"mappings":";;;;;;;AASA;AAMA;;UANiB,cAAA;wBACO;ECPZ,IAAA,CAAA,GAAK,EAAA,MAAA,CAAA,EAAA,IAAG;EACR,KAAA,EAAA,EAAA,IAAA;;AACY,UDUP,eAAA,CCVO;EACP,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAQ,OAAA,EAAA,MAAA;IACJ,eAAA,EAAA,MAAA,GAAA,MAAA;EAAO,CAAA;EAAxB,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA,GAAA;EAAgB,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA,GAAA,EAAA;AACpB;;;KALY,KAAA,GAAQ;KACR,6BACI,QAAQ,sBACP,QAAQ,SACrB,iBAAiB,OAAO;ADEX,KCDL,oBDCmB,CACP,MAAA,CAAA,GCFmB,gBAAA,CAAiB,MDErB,CCF4B,MDE5B,CAAA;AAKtB,KCNL,mBAAA,GAAsB,gBAAA,CAAiB,KDMnB;KCCpB,kBAAgB,YAAU,qCAAqC;KAC/D,mBAAiB,YAAU,qCAAqC;AAdhE,UAiBK,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/sqlite-adapter.ts","../src/types.ts","../src/database.ts","../src/jsonl-reader.ts","../src/jsonl-writer.ts","../src/schema-loader.ts","../src/directory-scanner.ts","../src/schema.ts","../src/type-generator.ts","../src/jsonl-migration.ts","../src/schema-extensions.ts","../src/runtime.ts"],"sourcesContent":[],"mappings":";;;;;;;AASA;AAMA;;UANiB,cAAA;wBACO;ECPZ,IAAA,CAAA,GAAK,EAAA,MAAA,CAAA,EAAA,IAAG;EACR,KAAA,EAAA,EAAA,IAAA;;AACY,UDU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Ac;EACV,WAAA,CAAA,OAAA,EOiBO,oBPjBP;EAAQ;;;EAEH,QAAA,CAAA,CAAA,EOkCD,OPlCC,CAAA,MAAA,CAAA;EAAO;;;EAChB,QAAA,UAAA;EACA;AAOZ;;EAAsC,QAAA,wBAAA;EAAqC,QAAA,sBAAA;EAAC,QAAA,cAAA;AAC5E;;;UQZiB,sBAAA;;ETIA,SAAA,EAAA,MAAc;EAMd,IAAA,ESPT,UTOS,EAAe;;;;ACZhC;AACA;AACgB,iBQUM,oBAAA,CRVN,OAAA,EQUoC,sBRVpC,CAAA,EQU6D,ORV7D,CAAA,IAAA,CAAA;;;;;;ADIhB;AAMiB,cURJ,iBVQmB,EAAA,SAAA,CAAA,YAAA,EAAA,aAAA,EAAA,aAAA,CAAA;KUPpB,eAAA,WAA0B;;;ATLtC;AACA;AACgB,iBSkBM,cAAA,CTlBN,GAAA,EAAA,MAAA,EAAA,SAAA,EAAA,MAAA,CAAA,ESkBsD,OTlBtD,CAAA,MAAA,GAAA,SAAA,CAAA;AAIhB;AAOA;;AAAsC,iBSyCtB,YAAA,CTzCsB,QAAA,EAAA,MAAA,CAAA,EAAA,OAAA;;;AACtC;;AAAuC,iBSgDvB,8BAAA,CThDuB,QAAA,EAAA,MAAA,CAAA,EAAA,MAAA,GAAA,IAAA;;;AAGvC;AAQA;AAOiB,iBS2CD,yBAAA,CTvCQ,QAAA,EAAA,MAAd,CAAA,EAAA,MAAa;;;;;;AD9BN,KWLL,kBAAA,GXMY,MAAA,GAAA,SAAe;AAKtB,iBWTD,aAAA,CAAA,CXSgB,EWTC,kBXSD;cWAnB,SAAO"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,10 +29,18 @@ type StandardSchemaResult<Output> = StandardSchemaV1.Result<Output>;
|
|
|
29
29
|
type StandardSchemaIssue = StandardSchemaV1.Issue;
|
|
30
30
|
type InferInput<T$1> = T$1 extends StandardSchemaV1<infer I, unknown> ? I : never;
|
|
31
31
|
type InferOutput<T$1> = T$1 extends StandardSchemaV1<unknown, infer O> ? O : never;
|
|
32
|
+
interface TableValidationResult {
|
|
33
|
+
tableName: string;
|
|
34
|
+
valid: boolean;
|
|
35
|
+
rowCount: number;
|
|
36
|
+
errors: ValidationErrorDetail[];
|
|
37
|
+
warnings: string[];
|
|
38
|
+
}
|
|
32
39
|
interface ValidationResult {
|
|
33
40
|
valid: boolean;
|
|
34
41
|
errors: ValidationErrorDetail[];
|
|
35
42
|
warnings: string[];
|
|
43
|
+
tableResults: TableValidationResult[];
|
|
36
44
|
}
|
|
37
45
|
interface ValidationErrorDetail {
|
|
38
46
|
file: string;
|
|
@@ -527,5 +535,5 @@ type RuntimeEnvironment = 'node' | 'unknown';
|
|
|
527
535
|
declare function detectRuntime(): RuntimeEnvironment;
|
|
528
536
|
declare const RUNTIME: RuntimeEnvironment;
|
|
529
537
|
//#endregion
|
|
530
|
-
export { type BiDirectionalSchema, type ColumnDefinition, type DatabaseConfig, DirectoryScanner, type ForeignKeyDefinition, type IndexDefinition, type InferInput, type InferOutput, type JsonArray, type JsonObject, type JsonValue, JsonlReader, JsonlWriter, LinesDB, RUNTIME, type RuntimeEnvironment, SCHEMA_EXTENSIONS, type SQLiteDatabase, type SQLiteStatement, type SchemaExtension, SchemaLoader, type SchemaOptions, type StandardSchema, type StandardSchemaIssue, type StandardSchemaResult, type Table, type TableConfig, type TableDefs, type TableSchema, type TableValidationOptions, TypeGenerator, type TypeGeneratorOptions, type ValidationError, type ValidationErrorDetail, type ValidationResult, defineSchema, detectRuntime, ensureTableRowsValid, extractTableNameFromSchemaFile, findSchemaFile, hasBackward, isSchemaFile, rewriteExtensionForImport };
|
|
538
|
+
export { type BiDirectionalSchema, type ColumnDefinition, type DatabaseConfig, DirectoryScanner, type ForeignKeyDefinition, type IndexDefinition, type InferInput, type InferOutput, type JsonArray, type JsonObject, type JsonValue, JsonlReader, JsonlWriter, LinesDB, RUNTIME, type RuntimeEnvironment, SCHEMA_EXTENSIONS, type SQLiteDatabase, type SQLiteStatement, type SchemaExtension, SchemaLoader, type SchemaOptions, type StandardSchema, type StandardSchemaIssue, type StandardSchemaResult, type Table, type TableConfig, type TableDefs, type TableSchema, type TableValidationOptions, type TableValidationResult, TypeGenerator, type TypeGeneratorOptions, type ValidationError, type ValidationErrorDetail, type ValidationResult, defineSchema, detectRuntime, ensureTableRowsValid, extractTableNameFromSchemaFile, findSchemaFile, hasBackward, isSchemaFile, rewriteExtensionForImport };
|
|
531
539
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/sqlite-adapter.ts","../src/types.ts","../src/database.ts","../src/jsonl-reader.ts","../src/jsonl-writer.ts","../src/schema-loader.ts","../src/directory-scanner.ts","../src/schema.ts","../src/type-generator.ts","../src/jsonl-migration.ts","../src/schema-extensions.ts","../src/runtime.ts"],"sourcesContent":[],"mappings":";;;;;;;AASA;AAMA;;UANiB,cAAA;wBACO;ECPZ,IAAA,CAAA,GAAK,EAAA,MAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/sqlite-adapter.ts","../src/types.ts","../src/database.ts","../src/jsonl-reader.ts","../src/jsonl-writer.ts","../src/schema-loader.ts","../src/directory-scanner.ts","../src/schema.ts","../src/type-generator.ts","../src/jsonl-migration.ts","../src/schema-extensions.ts","../src/runtime.ts"],"sourcesContent":[],"mappings":";;;;;;;AASA;AAMA;;UANiB,cAAA;wBACO;ECPZ,IAAA,CAAA,GAAK,EAAA,MAAA,CAAA,EAAG,IAAA;EACR,KAAA,EAAA,EAAA,IAAA;;AACY,UDUP,eAAA,CCVO;EACP,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAQ,OAAA,EAAA,MAAA;IACJ,eAAA,EAAA,MAAA,GAAA,MAAA;EAAO,CAAA;EAAxB,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA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