Difference between revisions of "Modeler:8/RepositorySql"

From CaseTalk Wiki
Jump to: navigation, search
m
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
[[File:SqlRepository.png]]
[[File:SqlRepository.png]]


The SQL is extended with two more functions:
The SQLite function set is extended with a few more functions, especially used inside CaseTalk:
* md5(value)
* macro(value)


== md5 ==
== md5 ==
Line 19: Line 17:


   select  
   select  
   macro("%PROJECTNAME%\%IGNAME%\v%IGVERSION%\"||otftname) as FULL_OTFT  
   macro('%PROJECTNAME%\%IGNAME%\v%IGVERSION%\' || otftname) as FULL_OTFT  
   from otft;
   from otft;



Latest revision as of 15:45, 6 February 2018

SQL Repository

This window enables you to write advanced queries on the repository using sql. It uses the SQLite syntax. You may read about it at [1].

SqlRepository.png

The SQLite function set is extended with a few more functions, especially used inside CaseTalk:

md5

The md5 function generates a hash from the value passed as text.

 select 
 md5(otftname) as OTFT_HASH, OTFTName
 from otft;

macro

The macro function supports keywords also defined in the custom attribute keywords. An example query could be:

 select 
 macro('%PROJECTNAME%\%IGNAME%\v%IGVERSION%\' || otftname) as FULL_OTFT 
 from otft;

soundex

The soundex function returns a code for the text which allows text comparisons on the sound of them.

 select otftname, soundex(otftname) from otft

annotation

Extract the named annotation from a sectioned comment field. CaseTalk supports Custom Annotations, yet stores them in a single textblob. This function enables sql to extract the named annotation.

 select 
 otftname, 
 annotation('Comment', comment) as comment,
 annotation('Remarks', comment) as remarks
 from otft