Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added default value for builder parameter in ModelSelectors #408

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ export const ChoicesAggregateFieldsModelBase = ModelBase

export class ChoicesAggregateFieldsModelSelector extends QueryBuilder {
get count() { return this.__attr(`count`) }
avg(builder: string | ChoicesAvgFieldsModelSelector | ((selector: ChoicesAvgFieldsModelSelector) => ChoicesAvgFieldsModelSelector) | undefined) { return this.__child(`avg`, ChoicesAvgFieldsModelSelector, builder) }
max(builder: string | ChoicesMaxFieldsModelSelector | ((selector: ChoicesMaxFieldsModelSelector) => ChoicesMaxFieldsModelSelector) | undefined) { return this.__child(`max`, ChoicesMaxFieldsModelSelector, builder) }
min(builder: string | ChoicesMinFieldsModelSelector | ((selector: ChoicesMinFieldsModelSelector) => ChoicesMinFieldsModelSelector) | undefined) { return this.__child(`min`, ChoicesMinFieldsModelSelector, builder) }
stddev(builder: string | ChoicesStddevFieldsModelSelector | ((selector: ChoicesStddevFieldsModelSelector) => ChoicesStddevFieldsModelSelector) | undefined) { return this.__child(`stddev`, ChoicesStddevFieldsModelSelector, builder) }
stddev_pop(builder: string | ChoicesStddevPopFieldsModelSelector | ((selector: ChoicesStddevPopFieldsModelSelector) => ChoicesStddevPopFieldsModelSelector) | undefined) { return this.__child(`stddev_pop`, ChoicesStddevPopFieldsModelSelector, builder) }
stddev_samp(builder: string | ChoicesStddevSampFieldsModelSelector | ((selector: ChoicesStddevSampFieldsModelSelector) => ChoicesStddevSampFieldsModelSelector) | undefined) { return this.__child(`stddev_samp`, ChoicesStddevSampFieldsModelSelector, builder) }
sum(builder: string | ChoicesSumFieldsModelSelector | ((selector: ChoicesSumFieldsModelSelector) => ChoicesSumFieldsModelSelector) | undefined) { return this.__child(`sum`, ChoicesSumFieldsModelSelector, builder) }
var_pop(builder: string | ChoicesVarPopFieldsModelSelector | ((selector: ChoicesVarPopFieldsModelSelector) => ChoicesVarPopFieldsModelSelector) | undefined) { return this.__child(`var_pop`, ChoicesVarPopFieldsModelSelector, builder) }
var_samp(builder: string | ChoicesVarSampFieldsModelSelector | ((selector: ChoicesVarSampFieldsModelSelector) => ChoicesVarSampFieldsModelSelector) | undefined) { return this.__child(`var_samp`, ChoicesVarSampFieldsModelSelector, builder) }
variance(builder: string | ChoicesVarianceFieldsModelSelector | ((selector: ChoicesVarianceFieldsModelSelector) => ChoicesVarianceFieldsModelSelector) | undefined) { return this.__child(`variance`, ChoicesVarianceFieldsModelSelector, builder) }
avg(builder: string | ChoicesAvgFieldsModelSelector | ((selector: ChoicesAvgFieldsModelSelector) => ChoicesAvgFieldsModelSelector) | undefined = undefined) { return this.__child(`avg`, ChoicesAvgFieldsModelSelector, builder) }
max(builder: string | ChoicesMaxFieldsModelSelector | ((selector: ChoicesMaxFieldsModelSelector) => ChoicesMaxFieldsModelSelector) | undefined = undefined) { return this.__child(`max`, ChoicesMaxFieldsModelSelector, builder) }
min(builder: string | ChoicesMinFieldsModelSelector | ((selector: ChoicesMinFieldsModelSelector) => ChoicesMinFieldsModelSelector) | undefined = undefined) { return this.__child(`min`, ChoicesMinFieldsModelSelector, builder) }
stddev(builder: string | ChoicesStddevFieldsModelSelector | ((selector: ChoicesStddevFieldsModelSelector) => ChoicesStddevFieldsModelSelector) | undefined = undefined) { return this.__child(`stddev`, ChoicesStddevFieldsModelSelector, builder) }
stddev_pop(builder: string | ChoicesStddevPopFieldsModelSelector | ((selector: ChoicesStddevPopFieldsModelSelector) => ChoicesStddevPopFieldsModelSelector) | undefined = undefined) { return this.__child(`stddev_pop`, ChoicesStddevPopFieldsModelSelector, builder) }
stddev_samp(builder: string | ChoicesStddevSampFieldsModelSelector | ((selector: ChoicesStddevSampFieldsModelSelector) => ChoicesStddevSampFieldsModelSelector) | undefined = undefined) { return this.__child(`stddev_samp`, ChoicesStddevSampFieldsModelSelector, builder) }
sum(builder: string | ChoicesSumFieldsModelSelector | ((selector: ChoicesSumFieldsModelSelector) => ChoicesSumFieldsModelSelector) | undefined = undefined) { return this.__child(`sum`, ChoicesSumFieldsModelSelector, builder) }
var_pop(builder: string | ChoicesVarPopFieldsModelSelector | ((selector: ChoicesVarPopFieldsModelSelector) => ChoicesVarPopFieldsModelSelector) | undefined = undefined) { return this.__child(`var_pop`, ChoicesVarPopFieldsModelSelector, builder) }
var_samp(builder: string | ChoicesVarSampFieldsModelSelector | ((selector: ChoicesVarSampFieldsModelSelector) => ChoicesVarSampFieldsModelSelector) | undefined = undefined) { return this.__child(`var_samp`, ChoicesVarSampFieldsModelSelector, builder) }
variance(builder: string | ChoicesVarianceFieldsModelSelector | ((selector: ChoicesVarianceFieldsModelSelector) => ChoicesVarianceFieldsModelSelector) | undefined = undefined) { return this.__child(`variance`, ChoicesVarianceFieldsModelSelector, builder) }
}
export function selectFromChoicesAggregateFields() {
return new ChoicesAggregateFieldsModelSelector()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const ChoicesAggregateModelBase = withTypedRefs<Refs>()(ModelBase
})))

export class ChoicesAggregateModelSelector extends QueryBuilder {
aggregate(builder: string | ChoicesAggregateFieldsModelSelector | ((selector: ChoicesAggregateFieldsModelSelector) => ChoicesAggregateFieldsModelSelector) | undefined) { return this.__child(`aggregate`, ChoicesAggregateFieldsModelSelector, builder) }
nodes(builder: string | ChoicesModelSelector | ((selector: ChoicesModelSelector) => ChoicesModelSelector) | undefined) { return this.__child(`nodes`, ChoicesModelSelector, builder) }
aggregate(builder: string | ChoicesAggregateFieldsModelSelector | ((selector: ChoicesAggregateFieldsModelSelector) => ChoicesAggregateFieldsModelSelector) | undefined = undefined) { return this.__child(`aggregate`, ChoicesAggregateFieldsModelSelector, builder) }
nodes(builder: string | ChoicesModelSelector | ((selector: ChoicesModelSelector) => ChoicesModelSelector) | undefined = undefined) { return this.__child(`nodes`, ChoicesModelSelector, builder) }
}
export function selectFromChoicesAggregate() {
return new ChoicesAggregateModelSelector()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ChoicesModelSelector extends QueryBuilder {
get id() { return this.__attr(`id`) }
get poll_id() { return this.__attr(`poll_id`) }
get text() { return this.__attr(`text`) }
poll(builder: string | PollsModelSelector | ((selector: PollsModelSelector) => PollsModelSelector) | undefined) { return this.__child(`poll`, PollsModelSelector, builder) }
poll(builder: string | PollsModelSelector | ((selector: PollsModelSelector) => PollsModelSelector) | undefined = undefined) { return this.__child(`poll`, PollsModelSelector, builder) }
}
export function selectFromChoices() {
return new ChoicesModelSelector()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const ChoicesMutationResponseModelBase = withTypedRefs<Refs>()(ModelBase

export class ChoicesMutationResponseModelSelector extends QueryBuilder {
get affected_rows() { return this.__attr(`affected_rows`) }
returning(builder: string | ChoicesModelSelector | ((selector: ChoicesModelSelector) => ChoicesModelSelector) | undefined) { return this.__child(`returning`, ChoicesModelSelector, builder) }
returning(builder: string | ChoicesModelSelector | ((selector: ChoicesModelSelector) => ChoicesModelSelector) | undefined = undefined) { return this.__child(`returning`, ChoicesModelSelector, builder) }
}
export function selectFromChoicesMutationResponse() {
return new ChoicesMutationResponseModelSelector()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export const MutationRootModelBase = ModelBase
}))

export class MutationRootModelSelector extends QueryBuilder {
delete_choices(builder: string | ChoicesMutationResponseModelSelector | ((selector: ChoicesMutationResponseModelSelector) => ChoicesMutationResponseModelSelector) | undefined, args: { where: ChoicesBoolExp }) { return this.__child(`delete_choices`+ (args ? '('+['where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesMutationResponseModelSelector, builder) }
delete_polls(builder: string | PollsMutationResponseModelSelector | ((selector: PollsMutationResponseModelSelector) => PollsMutationResponseModelSelector) | undefined, args: { where: PollsBoolExp }) { return this.__child(`delete_polls`+ (args ? '('+['where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), PollsMutationResponseModelSelector, builder) }
insert_choices(builder: string | ChoicesMutationResponseModelSelector | ((selector: ChoicesMutationResponseModelSelector) => ChoicesMutationResponseModelSelector) | undefined, args: { objects: ChoicesInsertInput[], onConflict?: (ChoicesOnConflict | null) }) { return this.__child(`insert_choices`+ (args ? '('+['objects', 'onConflict'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesMutationResponseModelSelector, builder) }
insert_polls(builder: string | PollsMutationResponseModelSelector | ((selector: PollsMutationResponseModelSelector) => PollsMutationResponseModelSelector) | undefined, args: { objects: PollsInsertInput[], onConflict?: (PollsOnConflict | null) }) { return this.__child(`insert_polls`+ (args ? '('+['objects', 'onConflict'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), PollsMutationResponseModelSelector, builder) }
update_choices(builder: string | ChoicesMutationResponseModelSelector | ((selector: ChoicesMutationResponseModelSelector) => ChoicesMutationResponseModelSelector) | undefined, args: { inc?: (ChoicesIncInput | null), set?: (ChoicesSetInput | null), where: ChoicesBoolExp }) { return this.__child(`update_choices`+ (args ? '('+['inc', 'set', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesMutationResponseModelSelector, builder) }
update_polls(builder: string | PollsMutationResponseModelSelector | ((selector: PollsMutationResponseModelSelector) => PollsMutationResponseModelSelector) | undefined, args: { inc?: (PollsIncInput | null), set?: (PollsSetInput | null), where: PollsBoolExp }) { return this.__child(`update_polls`+ (args ? '('+['inc', 'set', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), PollsMutationResponseModelSelector, builder) }
delete_choices(builder: string | ChoicesMutationResponseModelSelector | ((selector: ChoicesMutationResponseModelSelector) => ChoicesMutationResponseModelSelector) | undefined = undefined, args: { where: ChoicesBoolExp }) { return this.__child(`delete_choices`+ (args ? '('+['where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesMutationResponseModelSelector, builder) }
delete_polls(builder: string | PollsMutationResponseModelSelector | ((selector: PollsMutationResponseModelSelector) => PollsMutationResponseModelSelector) | undefined = undefined, args: { where: PollsBoolExp }) { return this.__child(`delete_polls`+ (args ? '('+['where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), PollsMutationResponseModelSelector, builder) }
insert_choices(builder: string | ChoicesMutationResponseModelSelector | ((selector: ChoicesMutationResponseModelSelector) => ChoicesMutationResponseModelSelector) | undefined = undefined, args: { objects: ChoicesInsertInput[], onConflict?: (ChoicesOnConflict | null) }) { return this.__child(`insert_choices`+ (args ? '('+['objects', 'onConflict'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesMutationResponseModelSelector, builder) }
insert_polls(builder: string | PollsMutationResponseModelSelector | ((selector: PollsMutationResponseModelSelector) => PollsMutationResponseModelSelector) | undefined = undefined, args: { objects: PollsInsertInput[], onConflict?: (PollsOnConflict | null) }) { return this.__child(`insert_polls`+ (args ? '('+['objects', 'onConflict'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), PollsMutationResponseModelSelector, builder) }
update_choices(builder: string | ChoicesMutationResponseModelSelector | ((selector: ChoicesMutationResponseModelSelector) => ChoicesMutationResponseModelSelector) | undefined = undefined, args: { inc?: (ChoicesIncInput | null), set?: (ChoicesSetInput | null), where: ChoicesBoolExp }) { return this.__child(`update_choices`+ (args ? '('+['inc', 'set', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesMutationResponseModelSelector, builder) }
update_polls(builder: string | PollsMutationResponseModelSelector | ((selector: PollsMutationResponseModelSelector) => PollsMutationResponseModelSelector) | undefined = undefined, args: { inc?: (PollsIncInput | null), set?: (PollsSetInput | null), where: PollsBoolExp }) { return this.__child(`update_polls`+ (args ? '('+['inc', 'set', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), PollsMutationResponseModelSelector, builder) }
}
export function selectFromMutationRoot() {
return new MutationRootModelSelector()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ export const PollsAggregateFieldsModelBase = ModelBase

export class PollsAggregateFieldsModelSelector extends QueryBuilder {
get count() { return this.__attr(`count`) }
avg(builder: string | PollsAvgFieldsModelSelector | ((selector: PollsAvgFieldsModelSelector) => PollsAvgFieldsModelSelector) | undefined) { return this.__child(`avg`, PollsAvgFieldsModelSelector, builder) }
max(builder: string | PollsMaxFieldsModelSelector | ((selector: PollsMaxFieldsModelSelector) => PollsMaxFieldsModelSelector) | undefined) { return this.__child(`max`, PollsMaxFieldsModelSelector, builder) }
min(builder: string | PollsMinFieldsModelSelector | ((selector: PollsMinFieldsModelSelector) => PollsMinFieldsModelSelector) | undefined) { return this.__child(`min`, PollsMinFieldsModelSelector, builder) }
stddev(builder: string | PollsStddevFieldsModelSelector | ((selector: PollsStddevFieldsModelSelector) => PollsStddevFieldsModelSelector) | undefined) { return this.__child(`stddev`, PollsStddevFieldsModelSelector, builder) }
stddev_pop(builder: string | PollsStddevPopFieldsModelSelector | ((selector: PollsStddevPopFieldsModelSelector) => PollsStddevPopFieldsModelSelector) | undefined) { return this.__child(`stddev_pop`, PollsStddevPopFieldsModelSelector, builder) }
stddev_samp(builder: string | PollsStddevSampFieldsModelSelector | ((selector: PollsStddevSampFieldsModelSelector) => PollsStddevSampFieldsModelSelector) | undefined) { return this.__child(`stddev_samp`, PollsStddevSampFieldsModelSelector, builder) }
sum(builder: string | PollsSumFieldsModelSelector | ((selector: PollsSumFieldsModelSelector) => PollsSumFieldsModelSelector) | undefined) { return this.__child(`sum`, PollsSumFieldsModelSelector, builder) }
var_pop(builder: string | PollsVarPopFieldsModelSelector | ((selector: PollsVarPopFieldsModelSelector) => PollsVarPopFieldsModelSelector) | undefined) { return this.__child(`var_pop`, PollsVarPopFieldsModelSelector, builder) }
var_samp(builder: string | PollsVarSampFieldsModelSelector | ((selector: PollsVarSampFieldsModelSelector) => PollsVarSampFieldsModelSelector) | undefined) { return this.__child(`var_samp`, PollsVarSampFieldsModelSelector, builder) }
variance(builder: string | PollsVarianceFieldsModelSelector | ((selector: PollsVarianceFieldsModelSelector) => PollsVarianceFieldsModelSelector) | undefined) { return this.__child(`variance`, PollsVarianceFieldsModelSelector, builder) }
avg(builder: string | PollsAvgFieldsModelSelector | ((selector: PollsAvgFieldsModelSelector) => PollsAvgFieldsModelSelector) | undefined = undefined) { return this.__child(`avg`, PollsAvgFieldsModelSelector, builder) }
max(builder: string | PollsMaxFieldsModelSelector | ((selector: PollsMaxFieldsModelSelector) => PollsMaxFieldsModelSelector) | undefined = undefined) { return this.__child(`max`, PollsMaxFieldsModelSelector, builder) }
min(builder: string | PollsMinFieldsModelSelector | ((selector: PollsMinFieldsModelSelector) => PollsMinFieldsModelSelector) | undefined = undefined) { return this.__child(`min`, PollsMinFieldsModelSelector, builder) }
stddev(builder: string | PollsStddevFieldsModelSelector | ((selector: PollsStddevFieldsModelSelector) => PollsStddevFieldsModelSelector) | undefined = undefined) { return this.__child(`stddev`, PollsStddevFieldsModelSelector, builder) }
stddev_pop(builder: string | PollsStddevPopFieldsModelSelector | ((selector: PollsStddevPopFieldsModelSelector) => PollsStddevPopFieldsModelSelector) | undefined = undefined) { return this.__child(`stddev_pop`, PollsStddevPopFieldsModelSelector, builder) }
stddev_samp(builder: string | PollsStddevSampFieldsModelSelector | ((selector: PollsStddevSampFieldsModelSelector) => PollsStddevSampFieldsModelSelector) | undefined = undefined) { return this.__child(`stddev_samp`, PollsStddevSampFieldsModelSelector, builder) }
sum(builder: string | PollsSumFieldsModelSelector | ((selector: PollsSumFieldsModelSelector) => PollsSumFieldsModelSelector) | undefined = undefined) { return this.__child(`sum`, PollsSumFieldsModelSelector, builder) }
var_pop(builder: string | PollsVarPopFieldsModelSelector | ((selector: PollsVarPopFieldsModelSelector) => PollsVarPopFieldsModelSelector) | undefined = undefined) { return this.__child(`var_pop`, PollsVarPopFieldsModelSelector, builder) }
var_samp(builder: string | PollsVarSampFieldsModelSelector | ((selector: PollsVarSampFieldsModelSelector) => PollsVarSampFieldsModelSelector) | undefined = undefined) { return this.__child(`var_samp`, PollsVarSampFieldsModelSelector, builder) }
variance(builder: string | PollsVarianceFieldsModelSelector | ((selector: PollsVarianceFieldsModelSelector) => PollsVarianceFieldsModelSelector) | undefined = undefined) { return this.__child(`variance`, PollsVarianceFieldsModelSelector, builder) }
}
export function selectFromPollsAggregateFields() {
return new PollsAggregateFieldsModelSelector()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const PollsAggregateModelBase = withTypedRefs<Refs>()(ModelBase
})))

export class PollsAggregateModelSelector extends QueryBuilder {
aggregate(builder: string | PollsAggregateFieldsModelSelector | ((selector: PollsAggregateFieldsModelSelector) => PollsAggregateFieldsModelSelector) | undefined) { return this.__child(`aggregate`, PollsAggregateFieldsModelSelector, builder) }
nodes(builder: string | PollsModelSelector | ((selector: PollsModelSelector) => PollsModelSelector) | undefined) { return this.__child(`nodes`, PollsModelSelector, builder) }
aggregate(builder: string | PollsAggregateFieldsModelSelector | ((selector: PollsAggregateFieldsModelSelector) => PollsAggregateFieldsModelSelector) | undefined = undefined) { return this.__child(`aggregate`, PollsAggregateFieldsModelSelector, builder) }
nodes(builder: string | PollsModelSelector | ((selector: PollsModelSelector) => PollsModelSelector) | undefined = undefined) { return this.__child(`nodes`, PollsModelSelector, builder) }
}
export function selectFromPollsAggregate() {
return new PollsAggregateModelSelector()
Expand Down
Loading