| 998 | } |
| 999 | |
| 1000 | func (c *cc) convertFuncCastExpr(n *pcast.FuncCastExpr) ast.Node { |
| 1001 | typeName := types.TypeStr(n.Tp.GetType()) |
| 1002 | |
| 1003 | // MySQL CAST AS UNSIGNED/SIGNED uses bigint internally. |
| 1004 | // We need to preserve the signed/unsigned info for formatting. |
| 1005 | if typeName == "bigint" { |
| 1006 | if mysql.HasUnsignedFlag(n.Tp.GetFlag()) { |
| 1007 | typeName = "bigint unsigned" |
| 1008 | } else { |
| 1009 | typeName = "bigint signed" |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | return &ast.TypeCast{ |
| 1014 | Arg: c.convert(n.Expr), |
| 1015 | TypeName: &ast.TypeName{Name: typeName}, |
| 1016 | } |
| 1017 | } |
| 1018 | |
| 1019 | func (c *cc) convertGetFormatSelectorExpr(n *pcast.GetFormatSelectorExpr) ast.Node { |
| 1020 | return todo(n) |