Programming Features

Other changes in Texis version 6 primarily affect Vortex and SQL programmers. The default APICP settings for tsql are the same as for texis (Vortex) in version 6, to avoid confusion when testing Vortex SQL via command-line tsql. This means query protection is on by default in tsql. System-wide defaults for APICP settings can now be set in texis.ini (see the [Apicp] section). The APICP setting/alias querysettings was added (here); it replaces the deprecated (but still temporarily supported) texisdefaults setting, which is a bit of a misnomer. An <apiinfo> function was added to Vortex (here), to obtain the current value of <apicp> settings.

A new XML and XSLT API was added, which offers more flexible parsing of complex or multi-level documents than possible with a flat timport. XSL stylesheets can be applied to XML documents with the XSLT API. See the XML API section (here) for details.

The handling of strlst and other multi-value SQL types to and from SQL statements in Vortex was changed with the addition of <sqlcp arrayconvert> (here). In version 6, multi-value Vortex parameters passed to a SQL statement become strlst instead of comma-separated string parameters, and returned SQL columns of type strlst are automatically broken up into multi-value Vortex variable arrays.

Columns returned from SQL INSERT, DELETE and UPDATE statements can be limited with the same flexibility as those from SELECT statements, with the addition of the okvars option to the <sql> statement (here). This limits the columns from SQL that are actually returned as Vortex variables, to only those listed in okvars. This can be useful in situations where the new return value from just one column in an UPDATE statement is desired, without "stomping" other Vortex variables for the other columns.

New SQL types int64 and uint64 were added, for 64-bit signed and unsigned integers. These are valid across all platforms, unlike long whose size varies by platform. Some Vortex functions that return large integer values may use int64 in version 6, e.g. $ret.size from <stat>. The varint and int(N) types were also added, for declaring multi-value integers.

Two new columns were added to the "tables" produced by direct indexaccess SELECTing from Metamorph indexes: RowCount and OccurrenceCount. The latter - for Metamorph inverted indexes only - gives the count of all hits in all rows, not just the number of rows, for the word.

More result set size information is available from <sql> statements with the $sqlresult.... variables added in version 6 (here). These provide more accurate and detailed information than $rows.min, $rows.max and $indexcount. For example, both the number of returned as well as total matched rows are available from GROUP BY statements.

Debugging Vortex scripts is easier with the $?var and $??var variable printing syntaxes (here). These syntaxes print more details about the Vortex variable var, such as its name, type, and all values, which can be useful when diagnosing unexpected script behavior.

The <exec> statement automatically double-quotes arguments as needed under Windows, usually obviating the need for separate statements for Windows and other OSes. See the quoteargs <exec> flag for details (here). More Vortex functions that output HTML are now XHTML-compliant, e.g. <options>, <checkbox>, <radiobutton> etc.

The REX set-subtract operator "--" was added, for subtracting from a set. E.g. "[\alpha--z]" matches any alphabetic character except "z". The anytotx plugin produces some extra headers, and supports Open Document Format (ODF) files.


Copyright © Thunderstone Software     Last updated: Oct 24 2023
Copyright © 2024 Thunderstone Software LLC. All rights reserved.