Add join to funcNames, and use to build declerationFunctions
parent
89a33a270d
commit
77f66c2175
|
@ -74,9 +74,9 @@ class BodyBuilder extends PureComponent<Props> {
|
|||
|
||||
private get newDeclarationFuncs(): string[] {
|
||||
const {body} = this.props
|
||||
const declarationFunctions = ['from']
|
||||
const declarationFunctions = [funcNames.FROM]
|
||||
if (body.length > 1) {
|
||||
declarationFunctions.push('join')
|
||||
declarationFunctions.push(funcNames.JOIN)
|
||||
}
|
||||
return declarationFunctions
|
||||
}
|
||||
|
@ -85,6 +85,9 @@ class BodyBuilder extends PureComponent<Props> {
|
|||
if (name === funcNames.FROM) {
|
||||
this.props.onAppendFrom()
|
||||
}
|
||||
if (name === funcNames.JOIN) {
|
||||
this.props.onAppendJoin()
|
||||
}
|
||||
}
|
||||
|
||||
private get funcNames() {
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
export const FROM = 'from'
|
||||
export const FILTER = 'filter'
|
||||
export const JOIN = 'join'
|
||||
|
|
Loading…
Reference in New Issue