addQIdentifier adds subquery/withQuery identifier and its mapKey into queryIdentifierSet
(s2aCtx *SQL2AqlContext, indentifier string, key int)
| 1894 | |
| 1895 | // addQIdentifier adds subquery/withQuery identifier and its mapKey into queryIdentifierSet |
| 1896 | func (v *ASTBuilder) addQIdentifier(s2aCtx *SQL2AqlContext, indentifier string, key int) error { |
| 1897 | if s2aCtx.queryIdentifierSet == nil { |
| 1898 | s2aCtx.queryIdentifierSet = make(map[string]int) |
| 1899 | } |
| 1900 | if _, exist := s2aCtx.queryIdentifierSet[indentifier]; exist { |
| 1901 | return fmt.Errorf("subquery/withQuery identifier: %v already exist", indentifier) |
| 1902 | } |
| 1903 | s2aCtx.queryIdentifierSet[indentifier] = key |
| 1904 | |
| 1905 | return nil |
| 1906 | } |
| 1907 | |
| 1908 | // isWithQueryIdentifier check if name is a withQuery identifier |
| 1909 | func (v *ASTBuilder) isWithQueryIdentifier(s2aCtx *SQL2AqlContext, name string) bool { |
no test coverage detected