Skip to content

Tcl_script_eval

Paweł Salawa edited this page Jan 15, 2018 · 1 revision

Definition

Language: Tcl
Plugin for language: ScriptingTcl
How to use: Create custom SQL function. Suggested name: tcl
Function arguments code
Function usage: SELECT tcl('glob -nocomplain *'); -- lists files in current directory
SELECT tcl('expr rand()'); -- generates random number
Description: Executes any Tcl code passed as a string in first argument to the function and returns result from that execution.

Code

eval [lindex $argv 0]