Mirror docs/tsl/codegen into the bundled tsl-api-reference skill and rebuild the function index. Remove invalid duplicate API entries for cb_delistedbydate, createhttpsession, exportJsonString, and Anova_Bartlett so exact lookup returns the canonical entries.
1.3 KiB
1.3 KiB
Builtin - 系统 / 平台与客户端
userName()
返回当前的用户。
返回:string
functionType()
当前运行的函数的类型。即返回当前函数是公用函数,还是用户函数。
返回:integer
functionName()
当前运行的函数的名称
返回:string
userConfig(section, ret_type)
返回用户的配置信息,Section为配置名,RetType用于指定返回的类型,0为字符串,1为数字,2为日期类型。注:此函数为特殊用途。
| 参数 | 类型 | 说明 |
|---|---|---|
section |
string | 字符串,配置名。 |
ret_type |
integer | 整数,返回类型。 |
返回:real|string|tdatetime
sudo(uid, exp)
以UID指定的用户执行EXP表达式,该EXP为隐式表达式,例如SUDO(“system”,DoSomeThing()),如用户需要用显式的表达式,采用SUDO(UID,Eval(Exp))即可。SUDO和User不一样,SUDO需要有权限,而且SUDO是完全以指定用户来执行,访问的数据资源等均以指定的UID来运行。与SetUID不一样的地方是SUDO执行完EXP后用户ID便恢复成原始的ID。
| 参数 | 类型 | 说明 |
|---|---|---|
uid |
string | 字符串,用户名。 |
exp |
expression | 表达式。 |
返回:any