Data Type Naming

This topic discusses data types in configurations for extension adapters and data sources.

TDV Types

For extension adapters, TDV supertypes are named in such a way that no leaf type and supertype have the same name, even when prefix characters like ~ and @ have been removed. For example, supertype ~date is now referred to as dates, to distinguish it from the leaf type date (formerly denoted @date). The new type names appear in YAML configuration files and in Studio.

The table shows the source hierarchy of supertypes (in bold) and leaf types. The right column lists the names that are used for extension adapters.

Source (capabilities files for built-in adapters)

Target (YAML files)

~any
any
~number
numbers
~whole_number
integers

 

 

 

@bit

bit

 

 

 

@integer

integer

 

 

 

@smallint

smalling

 

 

 

@tinyint

tinyint

 

 

 

@bigint

bigint

 

 

~floating_point

 

floats

 

 

 

@float

float

 

 

 

@real

real

 

 

 

@double

double

 

 

 

@decimal

decimal

 

 

 

@numeric

numeric

 

~string

 

 

strings

 

 

@char

 

char

 

 

@varchar

 

varchar

 

 

@longvarchar

 

longvarchar

 

~binary

 

 

binaries

 

 

@binary

 

binary

 

 

@varbinary

 

varbinary

 

~date

 

 

dates

 

 

@date

 

date

 

 

@time

 

time

 

 

@timestamp

 

timestamp

 

~lob

 

 

lobs

 

 

@clob

 

clob

 

 

@blob

 

blob

 

@boolean

 

 

boolean

 

@null

 

 

null

 

~interval_year

 

 

year_intervals

 

 

@interval_year_to_month

 

interval_year_to_month

 

 

@interval_year

 

interval_year

 

 

@interval_month

 

interval_month

 

~interval_day

 

 

day_intervals

 

 

@interval_day

 

interval_day

 

 

@interval_hour

 

interval_hour

 

 

@interval_minute

 

interval_minute

 

 

@interval_second

 

interval_second

 

 

@interval_day_to_hour

 

interval_day_to_hour

 

 

@interval_day_to_minute

 

interval_day_to_minute

 

 

@interval_day_to_second

 

interval_day_to_second

 

 

@interval_hour_to_minute

 

interval_hour_to_minute

 

 

@interval_hour_to_second

 

interval_hour_to_second

 

 

@interval_minute_to_second

 

interval_minute_to_second

 

@xml

 

 

xml

All Types

In extension adapter configurations and data source overrides, TDV and native data type names appear in these areas:

Data type mappings
Clause support
Operator mappings
Function mappings

Native and TDV types often have the same name—for example, TDV’s date and Oracle's date. In capabilities files for built-in adapters, the two are differentiated using prefixes. A TDV supertype name would start with ~ (for example, ~date), a TDV leaf type would begin with @
(for example, @date) and a native type would have no prefix (for example, Oracle’s native type called date).

For extension adapters, the @ and ~ prefixes are no longer used. Whole-word prefixes, followed by a dot, now distinguish between native and TDV types:

cis.date—TDV leaf type
cis.dates—TDV super type
native.date—Oracle’s native type

It is recommended that you use the prefixes only in those parts of the configuration file where both TDV and native types can appear; that is, function and operator mappings. For instance, the same function can list both native and TDV types in the same argument combination.

Because data type mappings and clause support specifically request either TDV or native types, no ambiguity can occur and so no prefixes are required:

The data type mapping configuration section specifies TDV-to-native mappings and native-to-TDV mappings separately.
A configuration item describing a particular clause specifies unsupported native types and TDV native types separately.

For these sections, prefixes are unnecessary and discouraged for the sake of brevity.

Here are examples of how to refer to types for data type mappings and clauses:

date—TDV leaf type
dates—TDV supertype
date—Oracle's native type

Defining Functions in YAML

If you want to define a function as STRICT, add a new function entry in YAML, for example:

ascii.strict:
      display_name: ASCII
      native_expression:
      arguments:
        combination1:
          arguments_in_order:
          - cis.numbers, cis.strings

Notice that just like its traditional capability counterpart, the function mapping's native_expression property is left as blank.

After that if the query has strict option enabled, then the function will not be pushed down:

SELECT {option strict}

ascii(rid) a

FROM

<table name>