UDB ColsMeta object

  • 2 August 2022
  • 0 replies
  • 22 views

This article is about the ColsMeta object in the UDB object model. This model is for data exchange between USoft web UIs and Rules Engines.

This model is built around the udb, DataSourceMetaContainer, DataSourceContainer, Rowset, Rows, ColsMeta, and Cols object types. See also UDB events.

A ColsMeta object contains a collection of columns and can be used the extract the meta data of a column.

Column selectors

In the syntax block below, col is a column selector: an expression whereby you identify a single column or multiple columns in a data source. Column selectors play a role in calls to the ColsMeta object, but also in calls to the Cols object:

$.udbMeta( ds ).cols( col );
$.udb( ds ).cols( col );

You can identify a single column by a name string:

$.udbMeta( 'EMP' ).cols( 'EMPNO' );
$.udb( 'EMP' ).cols( 'EMPNO' );

or by a column ID, which is a combination of a '$' symbol and a generated integer:

$.udbMeta( 'EMP' ).cols( '$51' );
$.udb( 'EMP' ).cols( '$51' );

If the column is in an embedded data source, name that embedded data source, follow by a forward slash (/), then follow by a column name or column ID:

embedded-data-source/column-selector

You can also select one or more columns by type, using one of the meta selectors listed here. You cannot combine these meta selectors with other ways of selecting columns:

Meta selector Columns selected
:key
All key columns
:mandatory
All mandatory columns

Syntax

$.udbMeta( ds ).cols( col )

The optional ds is a data source selector.

The optional col is a column selector as explained at the top of this article.

All the functions listed for the ColsMeta object are equally exposed by the Cols object.


0 replies

Be the first to reply!

Reply