You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
paresr/ast/model/mysql/types those packages are involved.
The new repo will contain parser/ast packages, for sure.
The mysql package is small enough and has no dependency, so it could be put to the parser repo, too.
The model package contains DBInfoTableInfoCIStr and so on, dependent by ast, it can be move into ast and use the Go1.9 type alias feature:
The types package contains a lot of thing, I don't want it to be put in the parser repository.
Let's consider how to decompose the ast package dependency from types.
Most struct definitions in the ast package are abstract, such as ExprNodeNodeStmtNode, no problem for them.
The concrete struct definitions used in the ast of package are types.FieldTypetypes.Datum
types.Datum introduce a lot of thing, such as Time Decimal Json ...
Based on the observation that the only place using types.Datum is ValueExpr, if ValueExpr is an abstract one, ast do not necessarily depends on types.Datum. Let some package provide a NewValueExpr function, and make the ValueExpr an interface, the problem could be solved.
Handle types.FieldType is simple, it doesn't have many dependency, move it to the ast package and declare type FieldType = ast.FieldType in the types package would work.
Feature Request
This is required for #7922
Obviously, the dependency of current parser is ... a total mess
The text was updated successfully, but these errors were encountered: