Returns a set of attributes in base of the types given by the user (UDT).
 

1 connection.metadata.getAttributes

<connection.metadata.getAttributes>
    <catalog /> +
    <schemaPattern /> +
    <typeNamePattern /> +
    <attributeNamePattern /> +
</connection.metadata.getAttributes>
Example

Shows the description of the attributes. The first two arguments are null when it comes to informix.

Copy
<xsql-script name='connection_metadata.getAttributes_sample1'>
    <body>
        <println>
            <connection.metadata.getAttributes >
                <null />
                <null />
                <string>%</string>
                <string>%</string>
            </connection.metadata.getAttributes>
        </println>
    </body>
</xsql-script>
Copy
+--------------+----------+---------------+--------------+---------+--------------+---------+--------------+--------------+--------+-------+--------+-------------+----------------+-----------------+----------------+-----------+-------------+------------+-----------+----------------+
|type_cat      |type_schem|type_name      |attr_name     |data_type|attr_type_name|attr_size|decimal_digits|num_prec_radix|nullable|remarks|attr_def|sql_data_type|sql_datetime_sub|char_octet_length|ordinal_position|is_nullable|scope_catalog|scope_schema|scope_table|source_data_type|
+--------------+----------+---------------+--------------+---------+--------------+---------+--------------+--------------+--------+-------+--------+-------------+----------------+-----------------+----------------+-----------+-------------+------------+-----------+----------------+
|demo_formacion|erp       |salary_t       |base           |        8|money         |        9|             2|            10|       1|       |        |            0|               0|                0|               1|YES        |             |            |           |                |
|demo_formacion|erp       |salary_t       |bonus          |        8|money         |        9|             2|            10|       1|       |        |            0|               0|                0|               2|YES        |             |            |           |                |
|demo_formacion|informix  |r_aux          |imploc         |        5|decimal       |       14|             2|            10|       0|       |        |            0|               0|                0|               3|NO         |             |            |           |                |
|demo_formacion|informix  |r_aux          |impdiv         |        5|decimal       |       14|             2|            10|       0|       |        |            0|               0|                0|               4|NO         |             |            |           |                |
|demo_formacion|informix  |r_main         |code           |        2|int           |        4|             2|            10|       0|       |        |            0|               0|                0|               1|NO         |             |            |           |                |
|demo_formacion|informix  |r_main         |name           |        0|char          |       40|             0|             0|       1|       |        |            0|               0|               40|               2|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|cod_tipo_ent   |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|               1|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|prov           |        1|smallint      |        2|             2|            10|       0|       |        |            0|               0|                0|               2|NO         |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|state          |       15|nchar         |        1|             0|             0|       0|       |        |            0|               0|                0|               3|NO         |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|f_inscrip      |        7|date          |        4|             0|             0|       1|       |        |            0|               0|                0|               4|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|name           |       15|nchar         |      950|             0|             0|       1|       |        |            0|               0|                0|               5|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|exten_ign      |        5|decimal       |       16|             2|            10|       1|       |        |            0|               0|                0|               6|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|population     |        2|int           |        4|             2|            10|       1|       |        |            0|               0|                0|               7|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|f_population   |        7|date          |        4|             0|             0|       1|       |        |            0|               0|                0|               8|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|cod_type_cap   |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|               9|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|mun_cap        |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|              10|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|name_cap       |       16|nvarchar      |      150|             0|             0|       1|       |        |            0|               0|                0|              11|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|cod_norm       |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|              12|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|text_norm      |       16|nvarchar      |      250|             0|             0|       1|       |        |            0|               0|                0|              13|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|f_norm         |        7|date          |        4|             0|             0|       1|       |        |            0|               0|                0|              14|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|nu_bulletin_nor|        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|              15|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|f_bulletin_nor |        7|date          |        4|             0|             0|       1|       |        |            0|               0|                0|              16|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|f_efectiv_nor  |        7|date          |        4|             0|             0|       1|       |        |            0|               0|                0|              17|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|domain_www     |       16|nvarchar      |      250|             0|             0|       1|       |        |            0|               0|                0|              18|YES        |             |            |           |                |
|demo_formacion|rel       |rel_ent_comunes|f_recording    |        7|date          |        4|             0|             0|       1|       |        |            0|               0|                0|              19|YES        |             |            |           |                |
|demo_formacion|rel       |rel_municipios |mun            |        1|smallint      |        2|             2|            10|       0|       |        |            0|               0|                0|              20|NO         |             |            |           |                |
|demo_formacion|rel       |rel_municipios |rel_island     |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|              21|YES        |             |            |           |                |
|demo_formacion|rel       |rel_municipios |prov_ign       |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|              22|YES        |             |            |           |                |
|demo_formacion|rel       |rel_municipios |muni_ign       |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|              23|YES        |             |            |           |                |
|demo_formacion|rel       |rel_municipios |cod_functioni  |        1|smallint      |        2|             2|            10|       1|       |        |            0|               0|                0|              24|YES        |             |            |           |                |
+--------------+----------+---------------+--------------+---------+--------------+---------+--------------+--------------+--------+-------+--------+-------------+----------------+-----------------+----------------+-----------+-------------+------------+-----------+----------------+