Comparing version 0.4.0 to 0.4.1
@@ -9,2 +9,8 @@ /// <reference types="knex" /> | ||
} | ||
export declare namespace BirchTree { | ||
export import KnexTypes = Knex; | ||
export import QueryBuilder = Knex.QueryBuilder; | ||
export import QueryInterface = Knex.QueryInterface; | ||
export import Transaction = Knex.Transaction; | ||
} | ||
export default function birchtree(knex: Knex, cache?: Map<string, string[]>): BirchTree; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Knex = require("knex"); | ||
const grow_1 = require("./grow"); | ||
const nest_1 = require("./nest"); | ||
var BirchTree; | ||
(function (BirchTree) { | ||
BirchTree.KnexTypes = Knex; | ||
})(BirchTree = exports.BirchTree || (exports.BirchTree = {})); | ||
function birchtree(knex, cache = new Map()) { | ||
@@ -6,0 +11,0 @@ this.knex = knex; |
@@ -7,2 +7,3 @@ "use strict"; | ||
const birchtree_1 = require("./birchtree"); | ||
exports.BirchTree = birchtree_1.BirchTree; | ||
exports.default = birchtree_1.default; |
/// <reference types="knex" /> | ||
import * as Knex from 'knex'; | ||
import { BirchTree } from './birchtree'; | ||
@@ -18,11 +17,11 @@ export interface ModelConstructor { | ||
constructor(type: ModelConstructor, birch: BirchTree); | ||
create(model: T, trx: Knex.Transaction): Promise<T>; | ||
exterminate(model: T, trx: Knex.Transaction): Promise<number>; | ||
find(attrs: any, trx: Knex.Transaction): Promise<T>; | ||
findOne(attrs: any, trx: Knex.Transaction): Promise<T>; | ||
findOneById(id: number, trx: Knex.Transaction): Promise<T>; | ||
findByIds(ids: number[], trx: Knex.Transaction): Promise<T[]>; | ||
save(model: T, trx: Knex.Transaction): Promise<T>; | ||
update(model: T, trx: Knex.Transaction): Promise<T>; | ||
createQuery(trx: Knex.Transaction): Knex.QueryBuilder; | ||
create(model: T, trx: BirchTree.Transaction): Promise<T>; | ||
exterminate(model: T, trx: BirchTree.Transaction): Promise<number>; | ||
find(attrs: any, trx: BirchTree.Transaction): Promise<T>; | ||
findOne(attrs: any, trx: BirchTree.Transaction): Promise<T>; | ||
findOneById(id: number, trx: BirchTree.Transaction): Promise<T>; | ||
findByIds(ids: number[], trx: BirchTree.Transaction): Promise<T[]>; | ||
save(model: T, trx: BirchTree.Transaction): Promise<T>; | ||
update(model: T, trx: BirchTree.Transaction): Promise<T>; | ||
createQuery(trx: BirchTree.Transaction): BirchTree.QueryBuilder; | ||
} |
{ | ||
"name": "birchtree", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Repository system and helper functions for knexjs", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
26864
502