Storage
Info
This page is automatically generated using brackets-storage-calls
.
To be compatible with every kind of storage, the manager is designed to use dependency injection, thanks to the CrudInterface implementation your are passing to its constructor.
Don't forget to check brackets-storage to find out if an implementation already exists for the storage you'd like to work with.
If it's not the case, you will have to implement it yourself...
And as it can be hard to do with something like a SQL database, so you don't have to read all the manager code, this page shows every usage of the CRUD interface by the manager.
Tip
Once you have your implementation up and running, feel free to make a PR on brackets-storage
to share your work with the community!
Dynamic table
select()
Source
select ( table , filter : Partial < DataTypes [ T ] > ) : Promise < DataTypes [ T ][] | null >
Stage
insert()
Source
insert ( 'stage' , value : OmitId < Stage > ) : Promise < number >
Source
insert ( 'stage' , values : Stage []) : Promise < boolean >
select()
Source
select ( 'stage' ) : Promise < Stage [] | null >
Source
select ( 'stage' , id : Id ) : Promise < Stage | null >
Source
select ( 'stage' , filter : {
tournament_id : Id ;
}) : Promise < Stage [] | null >
update()
Source
update ( 'stage' , id : Id , value : Stage ) : Promise < boolean >
delete()
Source
delete ( 'stage' ) : Promise < boolean >
Source
delete ( 'stage' , filter : {
id : Id ;
}) : Promise < boolean >
Group
selectFirst()
Source
selectFirst ( 'group' , filter : {
stage_id : Id ;
number : number ;
}) : Promise < Group | null >
insert()
Source
insert ( 'group' , value : OmitId < Group > ) : Promise < number >
Source
insert ( 'group' , values : Group []) : Promise < boolean >
select()
Source
select ( 'group' ) : Promise < Group [] | null >
Source
select ( 'group' , id : Id ) : Promise < Group | null >
Source
select ( 'group' , filter : {
stage_id : Id ;
}) : Promise < Group [] | null >
delete()
Source
delete ( 'group' ) : Promise < boolean >
Source
delete ( 'group' , filter : {
stage_id : Id ;
}) : Promise < boolean >
Round
selectLast()
Source
selectLast ( 'round' , filter : {
group_id : Id ;
}, assertUnique : false ) : Promise < Round | null >
selectFirst()
Source
selectFirst ( 'round' , filter : {
group_id : Id ;
number : number ;
}) : Promise < Round | null >
Source
selectFirst ( 'round' , filter : {
stage_id : Id ;
number : number ;
}, assertUnique : false ) : Promise < Round | null >
insert()
Source
insert ( 'round' , value : OmitId < Round > ) : Promise < number >
Source
insert ( 'round' , values : Round []) : Promise < boolean >
select()
Source
select ( 'round' ) : Promise < Round [] | null >
Source
select ( 'round' , id : Id ) : Promise < Round | null >
Source
select ( 'round' , filter : {
stage_id : Id ;
}) : Promise < Round [] | null >
Source
select ( 'round' , filter : {
group_id : Id ;
}) : Promise < Round [] | null >
delete()
Source
delete ( 'round' ) : Promise < boolean >
Source
delete ( 'round' , filter : {
stage_id : Id ;
}) : Promise < boolean >
Match
selectFirst()
Source
selectFirst ( 'match' , filter : {
round_id : Id ;
number : number ;
}) : Promise < Match | null >
Source
selectFirst ( 'match' , filter : {
group_id : Id ;
number : number ;
}) : Promise < Match | null >
insert()
Source
insert ( 'match' , value : OmitId < Match > ) : Promise < number >
Source
insert ( 'match' , values : Match []) : Promise < boolean >
select()
Source
select ( 'match' ) : Promise < Match [] | null >
Source
select ( 'match' , id : Id ) : Promise < Match | null >
Source
select ( 'match' , filter : {
round_id : Id ;
}) : Promise < Match [] | null >
Source
select ( 'match' , filter : {
stage_id : Id ;
}) : Promise < Match [] | null >
Source
select ( 'match' , filter : {
group_id : Id ;
}) : Promise < Match [] | null >
update()
Source
update ( 'match' , id : Id , value : Match ) : Promise < boolean >
Source
update ( 'match' , id : Id , value : {
id : Id ;
stage_id : Id ;
group_id : Id ;
round_id : Id ;
number : number ;
child_count : number ;
status : Status ;
opponent1 : ParticipantResult | null ;
opponent2 : ParticipantResult | null ;
}) : Promise < boolean >
Source
update ( 'match' , id : Id , value : {
child_count : number ;
id : Id ;
stage_id : Id ;
group_id : Id ;
round_id : Id ;
number : number ;
status : Status ;
opponent1 : ParticipantResult | null ;
opponent2 : ParticipantResult | null ;
}) : Promise < boolean >
Source
update ( 'match' , filter : {
stage_id : Id ;
}, value : {
child_count : number ;
}) : Promise < boolean >
Source
update ( 'match' , filter : {
group_id : Id ;
}, value : {
child_count : number ;
}) : Promise < boolean >
Source
update ( 'match' , filter : {
round_id : Id ;
}, value : {
child_count : number ;
}) : Promise < boolean >
delete()
Source
delete ( 'match' ) : Promise < boolean >
Source
delete ( 'match' , filter : {
stage_id : Id ;
}) : Promise < boolean >
Match game
selectFirst()
Source
selectFirst ( 'match_game' , filter : {
parent_id : Id ;
number : number ;
}) : Promise < MatchGame | null >
insert()
Source
insert ( 'match_game' , value : {
number : number ;
stage_id : Id ;
parent_id : Id ;
status : Status ;
opponent1 : {
id : null ;
};
opponent2 : {
id : null ;
};
}) : Promise < number >
Source
insert ( 'match_game' , value : OmitId < MatchGame > ) : Promise < number >
Source
insert ( 'match_game' , values : MatchGame []) : Promise < boolean >
select()
Source
select ( 'match_game' , id : Id ) : Promise < MatchGame | null >
Source
select ( 'match_game' , filter : {
parent_id : Id ;
}) : Promise < MatchGame [] | null >
update()
Source
update ( 'match_game' , id : Id , value : MatchGame ) : Promise < boolean >
Source
update ( 'match_game' , filter : {
parent_id : Id ;
}, value : Partial < MatchGame > ) : Promise < boolean >
delete()
Source
delete ( 'match_game' ) : Promise < boolean >
Source
delete ( 'match_game' , filter : {
parent_id : Id ;
number : number ;
}) : Promise < boolean >
Source
delete ( 'match_game' , filter : {
stage_id : Id ;
}) : Promise < boolean >
Participant
insert()
Source
insert ( 'participant' , value : OmitId < Participant > ) : Promise < number >
Source
insert ( 'participant' , values : Participant []) : Promise < boolean >
Source
insert ( 'participant' , values : OmitId < Participant > []) : Promise < boolean >
select()
Source
select ( 'participant' ) : Promise < Participant [] | null >
Source
select ( 'participant' , filter : {
tournament_id : Id ;
}) : Promise < Participant [] | null >
delete()
Source
delete ( 'participant' ) : Promise < boolean >