| 264 | } |
| 265 | |
| 266 | OCIType *get_tdo(char *typename, msOracleSpatialHandler *hand, msOracleSpatialDataHandler *dthand ) |
| 267 | { |
| 268 | OCIParam *paramp = NULL; |
| 269 | OCIRef *type_ref = NULL; |
| 270 | OCIType *tdoe = NULL; |
| 271 | int success = 0; |
| 272 | |
| 273 | |
| 274 | success = TRY( hand, OCIDescribeAny(hand->svchp, hand->errhp, (text *)typename, (ub4)strlen((char *)typename), OCI_OTYPE_NAME, (ub1)1, (ub1)OCI_PTYPE_TYPE, dthand->dschp)) |
| 275 | &&TRY( hand, OCIAttrGet((dvoid *)dthand->dschp, (ub4)OCI_HTYPE_DESCRIBE, (dvoid *)¶mp, (ub4 *)0, (ub4)OCI_ATTR_PARAM, hand->errhp)) |
| 276 | &&TRY( hand, OCIAttrGet((dvoid *)paramp, (ub4)OCI_DTYPE_PARAM, (dvoid *)&type_ref, (ub4 *)0, (ub4)OCI_ATTR_REF_TDO, hand->errhp)) |
| 277 | &&TRY( hand, OCIObjectPin(hand->envhp, hand->errhp, type_ref, (OCIComplexObject *)0, OCI_PIN_ANY, OCI_DURATION_SESSION, OCI_LOCK_NONE, (dvoid **)&tdoe)); |
| 278 | if (success) |
| 279 | return tdoe; |
| 280 | |
| 281 | /* if failure, return NULL*/ |
| 282 | return NULL; |
| 283 | } |
| 284 | |
| 285 | |
| 286 | /* check last_oci_status for MS_FAILURE (set by TRY()) if an error ocurred return 1; |
no test coverage detected