Generic Expression Tokens

unlisted

Generic Expression Tokens

 

Generic expressions are expressions that are valid for use anywhere in a template file.

Generic Expression

Description

<IF COUNTER_n>

The current value of counter n is non-zero. The value of n must be 1 or 2.

<IF COUNTER_n_op_val>

Evaluates the current value of counter n based on the specified operator and value. The value of n must be 1 or 2, corresponding to one of CodeGen's two template based counters, and the comparison value val must be an integer literal. Possible values for op are:

  EQ    Equal to

  NE    Not equal to

  LT    Less than

  GT    Greater than

  LE    Less than or equal to

  GE    Greater than or equal to

  DB    Divisible by

 

An example of using this expression is:

 

  <IF COUNTER_1_LE_10>

     template code for the first 10 items

  <ELSE>

     template code for subsequent items

  </IF> 

<IF DATABASE_MYSQL>

 

The database being targeted is MySQL. Refer to command line option -database.

<IF DATABASE_POSTGRESQL>

 

The database being targeted is PostgreSQL. Refer to command line option -database.

<IF DATABASE_SQLSERVER>

 

The database being targeted is SQL Server. Refer to command line option -database.

<IF DEBUG_LOGGING>

CodeGen is being run with debug logging enabled (-d command line option).

<IF FIELD_PREFIX>

A field prefix string has been specified (-prefix command line option)

<IF FIELD_SUBSET>

CodeGen is processing a subset of fields (-subset command line option or -fields command line option).

<IF MULTIPLE_STRUCTURES>

Multiple structures are being processed at the same time (-ms command line option).

<IF NAMESPACE>

A namespace has been specified (-n command line option).

<IF NOT_COUNTER_1>

The current value of counter 1 is zero.

<IF NOT_COUNTER_2>

The current value of counter 2 is zero.

<IF VERBOSE_LOGGING>

CodeGen is being run with verbose logging enabled (-v command line option).

 

 


Copyright © 2018  Synergex International, Inc.