DoltgresType returns the DoltgresType that the cast evaluates to. This is the same value that is returned by Type().
(ctx *sql.Context)
| 55 | |
| 56 | // DoltgresType returns the DoltgresType that the cast evaluates to. This is the same value that is returned by Type(). |
| 57 | func (c *GMSCast) DoltgresType(ctx *sql.Context) *pgtypes.DoltgresType { |
| 58 | // GMSCast shouldn't receive a DoltgresType, but we shouldn't error if it happens |
| 59 | if t, ok := c.sqlChild.Type(ctx).(*pgtypes.DoltgresType); ok { |
| 60 | return t |
| 61 | } |
| 62 | |
| 63 | return pgtypes.FromGmsType(c.sqlChild.Type(ctx)) |
| 64 | } |
| 65 | |
| 66 | // Eval implements the sql.Expression interface. |
| 67 | func (c *GMSCast) Eval(ctx *sql.Context, row sql.Row) (any, error) { |
no test coverage detected