Skip to content

Commit

Permalink
feat(docs): add comments in QueryExprTranslator
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Luthfi Fahlevi committed Aug 8, 2024
1 parent 17918ce commit cd81a69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/translator/query_expr_translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func (q *QueryExprTranslator) ConvertToSQL() (string, error) {
return q.SqlQuery.String(), nil
}

// TranslateToSQL The idea came from ast.Walk. Currently, the development focus implement for the node type that most likely used in our needs.
// TODO: implement translator for node type that still not covered right now.
func (q *QueryExprTranslator) TranslateToSQL(node *ast.Node, translator *QueryExprTranslator) {
if *node == nil {
return
Expand Down Expand Up @@ -175,6 +177,8 @@ func (q *QueryExprTranslator) ConvertToEsQuery() (string, error) {
return string(queryJSON), nil
}

// TranslateToEsQuery The idea came from ast.Walk. Currently, the development focus implement for the node type that most likely used in our needs.
// TODO: implement translator for node type that still not covered right now.
func (q *QueryExprTranslator) TranslateToEsQuery(node *ast.Node) interface{} {
if *node == nil {
return nil
Expand Down

0 comments on commit cd81a69

Please sign in to comment.