NewDIntVectorFromDArray is a helper routine to create a new *DArray, initialized from an existing *DArray, with the special oid for IntVector.
(d *DArray)
| 6014 | // NewDIntVectorFromDArray is a helper routine to create a new *DArray, |
| 6015 | // initialized from an existing *DArray, with the special oid for IntVector. |
| 6016 | func NewDIntVectorFromDArray(d *DArray) Datum { |
| 6017 | // Sanity: Validate the type of the array, since it should be int2. |
| 6018 | if !d.ParamTyp.Identical(types.Int2) { |
| 6019 | panic(errors.AssertionFailedf("int2vector can only be made from int2 not %s", d.ParamTyp.SQLStringForError())) |
| 6020 | } |
| 6021 | ret := new(DArray) |
| 6022 | *ret = *d |
| 6023 | ret.customOid = oid.T_int2vector |
| 6024 | return ret |
| 6025 | } |
| 6026 | |
| 6027 | // NewDOidVectorFromDArray is a helper routine to create a new *DArray, |
| 6028 | // initialized from an existing *DArray, with the special oid for OidVector. |
nothing calls this directly
no test coverage detected
searching dependent graphs…