-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix PromiseLike signatures. Remove ChainablePromiseLike
- Loading branch information
Showing
15 changed files
with
222 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import type { ChainablePromiseLike } from '../ChainablePromiseLike'; | ||
import type { Entity } from '../Entity'; | ||
|
||
import type { WhereQuery } from './WhereQuery'; | ||
|
||
export interface CountResult<TEntity extends Entity> extends ChainablePromiseLike<number> { | ||
export interface CountResult<TEntity extends Entity> extends PromiseLike<number> { | ||
where(args: WhereQuery<TEntity>): CountResult<TEntity> | number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import type { ChainablePromiseLike } from '../ChainablePromiseLike'; | ||
import type { Entity } from '../Entity'; | ||
|
||
import type { WhereQuery } from './WhereQuery'; | ||
|
||
export interface DestroyResult<TEntity extends Entity, TReturn> extends ChainablePromiseLike<TReturn> { | ||
export interface DestroyResult<TEntity extends Entity, TReturn> extends PromiseLike<TReturn> { | ||
where(args: WhereQuery<TEntity>): DestroyResult<TEntity, TReturn>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { column, primaryColumn, table, Entity } from '../../src'; | ||
|
||
import type { LevelTwo } from './LevelTwo'; | ||
|
||
@table({ | ||
name: 'level_one', | ||
}) | ||
export class LevelOne extends Entity { | ||
@primaryColumn({ type: 'string' }) | ||
public id!: string; | ||
|
||
@column({ | ||
type: 'string', | ||
required: true, | ||
}) | ||
public one!: string; | ||
|
||
@column({ | ||
type: 'string', | ||
}) | ||
public foo?: string; | ||
|
||
@column({ | ||
required: true, | ||
model: 'LevelTwo', | ||
name: 'level_two_id', | ||
}) | ||
public levelTwo!: LevelTwo | string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { column, primaryColumn, table, Entity } from '../../src'; | ||
|
||
@table({ | ||
name: 'level_three', | ||
}) | ||
export class LevelThree extends Entity { | ||
@primaryColumn({ type: 'string' }) | ||
public id!: string; | ||
|
||
@column({ | ||
type: 'string', | ||
}) | ||
public foo?: string; | ||
|
||
@column({ | ||
type: 'string', | ||
required: true, | ||
}) | ||
public three!: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { column, primaryColumn, table, Entity } from '../../src'; | ||
|
||
import type { LevelThree } from './LevelThree'; | ||
|
||
@table({ | ||
name: 'level_two', | ||
}) | ||
export class LevelTwo extends Entity { | ||
@primaryColumn({ type: 'string' }) | ||
public id!: string; | ||
|
||
@column({ | ||
type: 'string', | ||
required: true, | ||
}) | ||
public two!: string; | ||
|
||
@column({ | ||
type: 'string', | ||
}) | ||
public foo?: string; | ||
|
||
@column({ | ||
required: true, | ||
model: 'LevelThree', | ||
name: 'level_three_id', | ||
}) | ||
public levelThree!: LevelThree | string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.