better-sqlite3-schema
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -43,2 +43,4 @@ import { Statement } from 'better-sqlite3'; | ||
declare type MapRowFn = <T>(row: T) => T; | ||
export declare function toRefSchemas(schema: TableSchema): RefFieldSchema[]; | ||
export declare function toRefSchema(refField: string | RefFieldSchema, schema: TableSchema): RefFieldSchema; | ||
export declare type InsertRefSqls = { | ||
@@ -45,0 +47,0 @@ select: Statement; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.iterateRows = exports.makeSelectJoin = exports.makeSelectRefFieldArray = exports.countRows = exports.makeGetRefValueFnFromSchema = exports.makeSelectRefFieldSql = exports.makeSelectRowFnFromSchema = exports.forEach = exports.insertArrayField = exports.makeSchemaScanner = exports.isInt = exports.toSqliteDataType = exports.makeAutoAddFieldMapRowFn = exports.addField = exports.makeTableInfo = exports.removeAllIndices = exports.removeIndices = exports.getTables = exports.getIndices = exports.getTableFields = exports.makeInsertRefSqls = exports.makeDeduplicatedInsertRowFnFromSchema = exports.makeInsertRowFnFromSchema = exports.createDB = exports.delDBFile = void 0; | ||
exports.iterateRows = exports.makeSelectJoin = exports.makeSelectRefFieldArray = exports.countRows = exports.makeGetRefValueFnFromSchema = exports.makeSelectRefFieldSql = exports.makeSelectRowFnFromSchema = exports.forEach = exports.insertArrayField = exports.makeSchemaScanner = exports.isInt = exports.toSqliteDataType = exports.makeAutoAddFieldMapRowFn = exports.addField = exports.makeTableInfo = exports.removeAllIndices = exports.removeIndices = exports.getTables = exports.getIndices = exports.getTableFields = exports.makeInsertRefSqls = exports.toRefSchema = exports.toRefSchemas = exports.makeDeduplicatedInsertRowFnFromSchema = exports.makeInsertRowFnFromSchema = exports.createDB = exports.delDBFile = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -165,2 +165,3 @@ const better_sqlite3_helper_1 = tslib_1.__importDefault(require("better-sqlite3-helper")); | ||
} | ||
exports.toRefSchemas = toRefSchemas; | ||
function toRefSchema(refField, schema) { | ||
@@ -185,2 +186,3 @@ var _a; | ||
} | ||
exports.toRefSchema = toRefSchema; | ||
function makeInsertRefField(db, schema) { | ||
@@ -187,0 +189,0 @@ const field = schema.field; |
{ | ||
"name": "better-sqlite3-schema", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "Migrate (nested and multi-dimensional) json data to/from sqlite database with better-sqlite3-helper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
44569
662