CallSend is a way to call the `send` function for this type.
(ctx *sql.Context, val any)
| 1148 | |
| 1149 | // CallSend is a way to call the `send` function for this type. |
| 1150 | func (t *DoltgresType) CallSend(ctx *sql.Context, val any) ([]byte, error) { |
| 1151 | var o any |
| 1152 | var err error |
| 1153 | if t.ModInFunc != 0 || t.IsArrayType() { |
| 1154 | send := globalFunctionRegistry.GetFunction(ctx, t.SendFunc) |
| 1155 | resolvedTypes := send.ResolvedTypes() |
| 1156 | resolvedTypes[0] = t |
| 1157 | o, err = send.WithResolvedTypes(resolvedTypes).(QuickFunction).CallVariadic(ctx, val) |
| 1158 | } else { |
| 1159 | o, err = globalFunctionRegistry.GetFunction(ctx, t.SendFunc).CallVariadic(ctx, val) |
| 1160 | } |
| 1161 | if err != nil || o == nil { |
| 1162 | return nil, err |
| 1163 | } |
| 1164 | return o.([]byte), nil |
| 1165 | } |
| 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) { |
no test coverage detected