MCPcopy Create free account
hub / github.com/dolthub/doltgresql / DoltgresType

Method DoltgresType

server/expression/gms_cast.go:57–64  ·  view source on GitHub ↗

DoltgresType returns the DoltgresType that the cast evaluates to. This is the same value that is returned by Type().

(ctx *sql.Context)

Source from the content-addressed store, hash-verified

55
56// DoltgresType returns the DoltgresType that the cast evaluates to. This is the same value that is returned by Type().
57func (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.
67func (c *GMSCast) Eval(ctx *sql.Context, row sql.Row) (any, error) {

Callers 4

rowToBytesFunction · 0.95
EvalMethod · 0.95
TypeMethod · 0.95
record.goFile · 0.80

Calls 1

TypeMethod · 0.65

Tested by

no test coverage detected