CallReceive is a way to call the `receive` function for this type.
(ctx *sql.Context, val []byte)
| 1166 | |
| 1167 | // CallReceive is a way to call the `receive` function for this type. |
| 1168 | func (t *DoltgresType) CallReceive(ctx *sql.Context, val []byte) (any, error) { |
| 1169 | if t.TypType == TypeType_Domain { |
| 1170 | return globalFunctionRegistry.GetFunction(ctx, t.ReceiveFunc).CallVariadic(ctx, val, t.BaseTypeType.ID.AsId(), t.attTypMod) |
| 1171 | } else if t.ModInFunc != 0 || t.IsArrayType() { |
| 1172 | if t.Elem.ID != id.NullType { |
| 1173 | return globalFunctionRegistry.GetFunction(ctx, t.ReceiveFunc).CallVariadic(ctx, val, t.Elem.ID.AsId(), t.attTypMod) |
| 1174 | } else { |
| 1175 | return globalFunctionRegistry.GetFunction(ctx, t.ReceiveFunc).CallVariadic(ctx, val, t.ID.AsId(), t.attTypMod) |
| 1176 | } |
| 1177 | } else if t.TypType == TypeType_Enum { |
| 1178 | return globalFunctionRegistry.GetFunction(ctx, t.ReceiveFunc).CallVariadic(ctx, val, t.ID.AsId()) |
| 1179 | } else if t.IsCompositeType() { |
| 1180 | return globalFunctionRegistry.GetFunction(ctx, t.ReceiveFunc).CallVariadic(ctx, val, t.ID.AsId(), t.attTypMod) |
| 1181 | } else { |
| 1182 | return globalFunctionRegistry.GetFunction(ctx, t.ReceiveFunc).CallVariadic(ctx, val) |
| 1183 | } |
| 1184 | } |
| 1185 | |
| 1186 | // ConvertSerialized implements the val.TupleTypeHandler interface. |
| 1187 | func (t *DoltgresType) ConvertSerialized(ctx context.Context, other val.TupleTypeHandler, val []byte) ([]byte, error) { |
no test coverage detected