mythix-orm
Advanced tools
Comparing version 1.6.2 to 1.6.3
@@ -149,12 +149,14 @@ import { GenericObject } from './interfaces/common'; | ||
public static create(models: Array<Model | GenericObject>, options?: GenericObject): Promise<Array<Model>>; | ||
public static create(models: Model | GenericObject, options?: GenericObject): Promise<Model>; | ||
public static create<T extends Model = Model>(models: Array<T>, options?: GenericObject): Promise<Array<T>>; | ||
public static create<T extends Model = Model>(models: T, options?: GenericObject): Promise<T>; | ||
public static create<T extends Model = Model>(models: Array<GenericObject>, options?: GenericObject): Promise<Array<T>>; | ||
public static create<T extends Model = Model>(models: GenericObject, options?: GenericObject): Promise<T>; | ||
public static count(options?: GenericObject): Promise<number>; | ||
public static all(options?: GenericObject): Promise<Array<Model>>; | ||
public static fetchAll(options?: GenericObject): AsyncGenerator<Model>; | ||
public static first(limit?: number, options?: GenericObject): Promise<Model | undefined>; | ||
public static last(limit?: number, options?: GenericObject): Promise<Model | undefined>; | ||
public static all<T extends Model = Model>(options?: GenericObject): Promise<Array<T>>; | ||
public static fetchAll<T extends Model = Model>(options?: GenericObject): AsyncGenerator<T>; | ||
public static first<T extends Model = Model>(limit?: number, options?: GenericObject): Promise<T | undefined>; | ||
public static last<T extends Model = Model>(limit?: number, options?: GenericObject): Promise<T | undefined>; | ||
public static pluck(fields: string | Array<string>, options?: GenericObject): Promise<Array<any>>; | ||
public constructor(data: GenericObject, _options?: ModelOptions); | ||
public constructor(data?: GenericObject, _options?: ModelOptions); | ||
public getOptions(): ModelOptions; | ||
@@ -187,3 +189,3 @@ public _constructor(data?: GenericObject): void; | ||
public onAfterSave(context: HookContext): Promise<any>; | ||
public save(options?: GenericObject): Promise<Model | boolean>; | ||
public save(options?: GenericObject): Promise<this | boolean>; | ||
public reload(options?: GenericObject): Promise<void>; | ||
@@ -190,0 +192,0 @@ public destroy(options?: GenericObject): Promise<number>; |
@@ -56,7 +56,7 @@ import ConnectionBase from '../connection/connection-base'; | ||
public MERGE(queryEngine: QueryEngine): QueryEngine; | ||
public all(options?: GenericObject): Promise<Array<Model>>; | ||
public fetchAll(options?: GenericObject): AsyncGenerator<Model>; | ||
public first(limit?: number | null | undefined, options?: GenericObject): Promise<Model | undefined>; | ||
public last(limit?: number | null | undefined, options?: GenericObject): Promise<Model | undefined>; | ||
public update(attributes: Model | GenericObject, options?: GenericObject): Promise<number>; | ||
public all<T extends Model = Model>(options?: GenericObject): Promise<Array<T>>; | ||
public fetchAll<T extends Model = Model>(options?: GenericObject): AsyncGenerator<T>; | ||
public first<T extends Model = Model>(limit?: number | null | undefined, options?: GenericObject): Promise<T | undefined>; | ||
public last<T extends Model = Model>(limit?: number | null | undefined, options?: GenericObject): Promise<T | undefined>; | ||
public update<T extends Model = Model>(attributes: T | GenericObject, options?: GenericObject): Promise<number>; | ||
public destroy(options?: GenericObject): Promise<number>; | ||
@@ -82,2 +82,4 @@ public average(field: Field | string, options?: GenericObject): Promise<number>; | ||
(): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -88,2 +90,4 @@ }; | ||
(query: QueryEngine): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -94,2 +98,4 @@ }; | ||
(query: QueryEngine): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -100,2 +106,4 @@ }; | ||
(fullyQualifiedName: string | Field): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -106,2 +114,4 @@ }; | ||
(): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -112,2 +122,4 @@ }; | ||
(): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -118,2 +130,4 @@ }; | ||
(): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -124,2 +138,4 @@ }; | ||
(): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -130,2 +146,4 @@ }; | ||
(): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -136,2 +154,4 @@ }; | ||
(type: string | LiteralBase): QueryEngine; | ||
name: QueryEngine; | ||
[ key: string ]: QueryEngine; | ||
@@ -151,2 +171,3 @@ }; | ||
name: QueryEngine; | ||
[ key: string ]: any; | ||
@@ -153,0 +174,0 @@ } |
@@ -67,3 +67,3 @@ import ConnectionBase from '../connection/connection-base'; | ||
export declare function setRelationalValues<T = Model>( | ||
export declare function setRelationalValues<T extends Model = Model>( | ||
connection: ConnectionBase, | ||
@@ -70,0 +70,0 @@ TargetModel: ModelClass, |
{ | ||
"name": "mythix-orm", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"description": "ORM for Mythix framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
471140
11956