pcm_get_field_spec() - cassiobj/PCM-Python_lib GitHub Wiki

Table of Contents

pcm_get_field_spec Function

The pcm_get_field_spec function is part of a Python extension for Oracle BRM. It returns fields specifications.

Description

The pcm_get_field_spec returns an array with field specifications (native and custom fields)

Parameters

  • field: string with field name.

Return Value

Array
(
[type] => string (type field definition)
[descr] => string (field description)
[number] => int (field number)
[numberType] => int (Number of field type)
[status] => int (status)
)

Field Type

fiekld type        field number
UNUSED               0
INT                  1
ENUM                 3
STR                  5
BUF                  6
POID                 7
TSTAMP               8
ARRAY                9
SUBSTRUCT           10
OBJ                 11
BINSTR              12
ERR                 13
DECIMAL             14
TIME                15
TEXTBUF             16
ERRBUF              13

The function returns null case field not found.

In case of an error, the `error` exception is raised.

Usage

import PCMPy
...
...
...

field_def = PCMPy.pcm_get_field_spec(custom_fld)    
if ( field_def['type'] == "TSTAMP" ) :        
   ... timestamp processes
else :
   ... number process 

⚠️ **GitHub.com Fallback** ⚠️