SQL extension support

CONFREGEXP: Specifies the encoding of message content.

Usage:

CONFREGEXP('ECD', 'dbalias1=encoding1;dbalias2=encoding2’)

SMATREGEXP: Queries message content that match given regex.

Usage:

SMATREGEXP(regex, rowid, dbalias)

REGEXP: Queries columns of a message that match given regex.

Usage:

SMATREGEXP(regex, columnName)

SMATREGEXPDETAIL: Gets the position offset of matched regex.

Usage:

SMATREGEXPDETAIL(regex, rowid, dbalias)

Examples

To configure the encoding of database attach1 as latin1:

select CONFREGEXP(‘ECD’, ‘attach1=latine1’)

To search all columns and highlights of HL7 messages, where the message type is adt^a31 and to have it ordered by message ID:

select *, SMATREGEXPDETAIL('(\r)*?msh\|([^\|]*\|){8}+[^\|]*adt
^a31', rowid, 'main') from smat_msgs where (SMATREGEXP(‘(\r)*?msh\|([^\|]*\|){8}+[^\|]*adt
^a31', rowid, 'main') >0 ) order by MidDomain asc,  MidHub asc, MidNum asc