Skip to content

Qt_script_count

Paweł Salawa edited this page Jan 15, 2018 · 3 revisions

Definition

Language: Qt Script
Plugin for language: ScriptingQt
How to use: Create custom SQL function, set it to "aggregate" type. Suggested name: cnt
Function arguments Keep undefined
Function usage: SELECT cnt(*) from tableName
Description: Works just like classical count(*) from SQL.

Code

Initialization code:

n=0;

Per step code:

n++;

Final step code:

return n;