Returns the column's type. If the column does not exist, an exception is issued.

1 table.getColumnType

<table.getColumnType    table='table'    column='column'/>

Exceptions

Database required.

Falta especificar la base de datos.

Required attribute [...]

A required attribute has not been informed.

The column does not exist in the table.

Remarks

This function returns the value of the cache, so the first time that you use the table, the values of the metadata are load and stored in cache. It is difficult to get this information and thess values will not change unless a ddl operation occurs, it means an alteration of the physical model of the database, in which case is recommended to remove the corresponding caches through the function system.cache.clear, to obtain the real values.

Example

Print the capuntes.docser column's type.

Copy
<xsql-script name='test_getColumnType'>
<body>
<println>
<table.getColumnType table='capuntes' column='docser' />
</println>
</body>
</xsql-script>