File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -989,7 +989,30 @@ func (c *cc) convertLockTablesStmt(n *pcast.LockTablesStmt) ast.Node {
989
989
}
990
990
991
991
func (c * cc ) convertMatchAgainst (n * pcast.MatchAgainst ) ast.Node {
992
- return todo (n )
992
+ searchTerm := c .convert (n .Against )
993
+
994
+ stringSearchTerm := & ast.TypeCast {
995
+ Arg : searchTerm ,
996
+ TypeName : & ast.TypeName {
997
+ Name : "text" , // Use 'text' type which maps to string in Go
998
+ },
999
+ Location : n .OriginTextPosition (),
1000
+ }
1001
+
1002
+ matchOperation := & ast.A_Const {
1003
+ Val : & ast.String {Str : "MATCH_AGAINST" },
1004
+ }
1005
+
1006
+ return & ast.A_Expr {
1007
+ Name : & ast.List {
1008
+ Items : []ast.Node {
1009
+ & ast.String {Str : "AGAINST" },
1010
+ },
1011
+ },
1012
+ Lexpr : matchOperation ,
1013
+ Rexpr : stringSearchTerm ,
1014
+ Location : n .OriginTextPosition (),
1015
+ }
993
1016
}
994
1017
995
1018
func (c * cc ) convertMaxValueExpr (n * pcast.MaxValueExpr ) ast.Node {
You can’t perform that action at this time.
0 commit comments