Script
Extends
Constructors
new Script()
new Script(
dart):Script
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Overrides
Constructs
Script
Source
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
aux | public | any | undefined | Func.aux |
dart | public | any | undefined | Func.dart |
options | public | object | undefined | Func.options |
vecInputTableName | readonly | "in_vec_table" | 'in_vec_table' | - |
vecOutputTableName | readonly | "out_vec_table" | 'out_vec_table' | - |
Accessors
author
getauthor():User
Who created entity *
Returns
Source
clientCode
getclientCode():string
Script
Returns
string
Source
createdOn
getcreatedOn():Dayjs
Time when entity was created *
Returns
Dayjs
Source
description
getdescription():string
Returns
string
Source
environment
getenvironment():string
Environment name. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
setenvironment(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
friendlyName
getfriendlyName():string
Entity friendly name
setfriendlyName(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
helpUrl
gethelpUrl():string
Help URL.
sethelpUrl(url):void
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
string
Source
id
getid():string
Entity ID (GUID)
setid(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
inputs
getinputs():Property[]
Input parameters
Returns
Property[]
Source
isVectorFunc
getisVectorFunc():boolean
Indicates that the script is already vector, meaning it accepts vector input (an entire column) and processes it in a single call, rather than being executed separately for each scalar element (row)
Returns
boolean
Source
language
getlanguage():"r"|"javascript"|"julia"|"octave"|"python"|"nodejs"|"grok"|"pyodide"
Script language. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
setlanguage(s):void
Parameters
| Parameter | Type |
|---|---|
s | "r" | "javascript" | "julia" | "octave" | "python" | "nodejs" | "grok" | "pyodide" |
Returns
"r" | "javascript" | "julia" | "octave" | "python" | "nodejs" | "grok" | "pyodide"
Source
name
getname():string
Entity short name
setname(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
nqName
getnqName():string
Entity full-qualified name
Returns
string
Source
outputs
getoutputs():Property[]
Output parameters
Returns
Property[]
Source
package
getpackage():Package
A package this function belongs to.
Returns
Source
path
getpath():string
Entity path
Returns
string
Source
reference
getreference():string
Reference header parameter. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
setreference(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
sample
getsample():string
Sample table. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
setsample(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
script
getscript():string
Script
setscript(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
tags
gettags():string[]
Script tags. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
settags(tags):void
Parameters
| Parameter | Type |
|---|---|
tags | string[] |
Returns
string[]
Source
type
gettype():string
Returns
string
Source
updatedOn
getupdatedOn():null|Dayjs
Time when entity was updated *
Returns
null | Dayjs
Source
Methods
apply()
apply(
parameters):Promise<any>
Executes the function with the specified parameters, and returns result. If necessary, the corresponding package will be loaded as part of the call.
Parameters
| Parameter | Type |
|---|---|
parameters | any[] | object |
Returns
Promise<any>
Inherited from
Source
applySync()
applySync(
parameters):any
Executes the function synchronously, and returns the result. If the function is asynchronous, throws an exception.
Parameters
| Parameter | Type |
|---|---|
parameters | object |
Returns
any
Inherited from
Source
getProperties()
getProperties():
Promise<object>
Gets entity properties
Returns
Promise<object>
Inherited from
Source
hasTag()
hasTag(
tag):boolean
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
newId()
newId():
void
Generates new id for this entity.
Returns
void
Inherited from
Source
prepare()
prepare(
parameters):FuncCall
Returns FuncCall object in a stand-by state
Parameters
| Parameter | Type |
|---|---|
parameters | object |
Returns
Inherited from
Source
prepareAsync()
prepareAsync(
parameters):Promise<FuncCall>
Parameters
| Parameter | Type |
|---|---|
parameters | object |
Returns
Promise <FuncCall>
Inherited from
Source
setProperties()
setProperties(
props):Promise<any>
Sets entity properties
Parameters
| Parameter | Type |
|---|---|
props | object |
Returns
Promise<any>
Inherited from
Source
tag()
tag(
tag):boolean
Adds a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
toString()
toString():
string
Returns a string representing the object
Returns
string
Inherited from
Source
unTag()
unTag(
tag):boolean
Removes a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
byName()
staticbyName(name):Func
Returns a function with the specified name.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Inherited from
Source
create()
staticcreate(script):Script
Parameters
| Parameter | Type |
|---|---|
script | string |
Returns
Source
find()
staticfind(params?):Func[]
Returns functions with the specified attributes.
Parameters
| Parameter | Type |
|---|---|
params? | object |
params.meta? | any |
params.name? | string |
params.package? | string |
params.returnSemType? | string |
params.returnType? | string |
params.tags? | string[] |
Returns
Func[]
Inherited from
Source
findAll()
staticfindAll(params?):Promise<Func[]>
Parameters
| Parameter | Type |
|---|---|
params? | object |
params.meta? | any |
params.name? | string |
params.package? | string |
params.returnSemType? | string |
params.returnType? | string |
params.tags? | string[] |
Returns
Promise <Func[]>
Inherited from
Deprecated
Use find, it's the same now but does not make a server query and synchronous.
Source
fromParams()
staticfromParams(inputs,outputs,script):Script
Parameters
| Parameter | Type | Default value |
|---|---|---|
inputs | Property[] | undefined |
outputs | Property[] | undefined |
script | string | '' |