Script
Defined in: js-api/src/entities/func.ts:134
Represents a Script
Extends
Constructors
Constructor
new Script(
dart):Script
Defined in: js-api/src/entities/func.ts:139
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Script
Overrides
Properties
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
aux | public | any | undefined | Auxiliary data associated with the function, not persisted (a MapBag: indexed access plus the map methods; typed any so it can be cast to a package's own shape). | Func.aux | js-api/src/entities/func.ts:25 |
dart | public | any | undefined | - | Func.dart | js-api/src/entities/entity.ts:19 |
options | public | object | undefined | Function options (the meta.* annotations) as key-value pairs (a MapBag: indexed access plus the map methods; typed any so it can be cast to a package's own shape). | Func.options | js-api/src/entities/func.ts:27 |
vecInputTableName | readonly | "in_vec_table" | 'in_vec_table' | - | - | js-api/src/entities/func.ts:135 |
vecOutputTableName | readonly | "out_vec_table" | 'out_vec_table' | - | - | js-api/src/entities/func.ts:136 |
Accessors
author
Get Signature
get author():
any
Defined in: js-api/src/entities/entity.ts:57
Who created entity *
Returns
any
Inherited from
clientCode
Get Signature
get clientCode():
string
Defined in: js-api/src/entities/func.ts:154
Script
Returns
string
createdOn
Get Signature
get createdOn():
Dayjs
Defined in: js-api/src/entities/entity.ts:48
Time when entity was created *
Returns
Dayjs
Inherited from
description
Get Signature
get description():
string
Defined in: js-api/src/entities/func.ts:36
Returns
string
Set Signature
set description(
s):void
Defined in: js-api/src/entities/func.ts:37
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Inherited from
entityType
Get Signature
get entityType():
string
Defined in: js-api/src/entities/entity.ts:64
Entity type name *
Returns
string
Inherited from
environment
Get Signature
get environment():
string
Defined in: js-api/src/entities/func.ts:166
Environment name. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
Returns
string
Set Signature
set environment(
s):void
Defined in: js-api/src/entities/func.ts:167
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
friendlyName
Get Signature
get friendlyName():
string
Defined in: js-api/src/entities/entity.ts:34
Entity friendly name
Returns
string
Set Signature
set friendlyName(
x):void
Defined in: js-api/src/entities/entity.ts:35
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
helpUrl
Get Signature
get helpUrl():
string
Defined in: js-api/src/entities/func.ts:44
Help URL.
Returns
string
Set Signature
set helpUrl(
url):void
Defined in: js-api/src/entities/func.ts:46
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
void
Inherited from
id
Get Signature
get id():
string
Defined in: js-api/src/entities/entity.ts:27
Entity ID (GUID)
Returns
string
Set Signature
set id(
x):void
Defined in: js-api/src/entities/entity.ts:28
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
inputs
Get Signature
get inputs():
Property[]
Defined in: js-api/src/entities/func.ts:76
Input parameters
Returns
Property[]
Inherited from
isVectorFunc
Get Signature
get isVectorFunc():
boolean
Defined in: js-api/src/entities/func.ts:163
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
Overrides
language
Get Signature
get language():
"javascript"|"julia"|"octave"|"python"|"r"|"nodejs"|"grok"|"pyodide"
Defined in: js-api/src/entities/func.ts:157
Script language. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
Returns
"javascript" | "julia" | "octave" | "python" | "r" | "nodejs" | "grok" | "pyodide"
Set Signature
set language(
s):void
Defined in: js-api/src/entities/func.ts:158
Parameters
| Parameter | Type |
|---|---|
s | "javascript" | "julia" | "octave" | "python" | "r" | "nodejs" | "grok" | "pyodide" |
Returns
void
name
Get Signature
get name():
string
Defined in: js-api/src/entities/entity.ts:38
Entity short name
Returns
string
Set Signature
set name(
x):void
Defined in: js-api/src/entities/entity.ts:39
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
void
Inherited from
nqName
Get Signature
get nqName():
string
Defined in: js-api/src/entities/entity.ts:42
Entity full-qualified name
Returns
string
Inherited from
outputs
Get Signature
get outputs():
Property[]
Defined in: js-api/src/entities/func.ts:81
Output parameters
Returns
Property[]
Inherited from
package
Get Signature
get package():
any
Defined in: js-api/src/entities/func.ts:49
A package this function belongs to, or null for core functions (e.g. Sin).
Returns
any
Inherited from
path
Get Signature
get path():
string
Defined in: js-api/src/entities/func.ts:41
Entity path
Returns
string
Inherited from
reference
Get Signature
get reference():
string
Defined in: js-api/src/entities/func.ts:170
Reference header parameter. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
Returns
string
Set Signature
set reference(
s):void
Defined in: js-api/src/entities/func.ts:171
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
sample
Get Signature
get sample():
string
Defined in: js-api/src/entities/func.ts:174
Sample table. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
Returns
string
Set Signature
set sample(
s):void
Defined in: js-api/src/entities/func.ts:175
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
script
Get Signature
get script():
string
Defined in: js-api/src/entities/func.ts:150
Script
Returns
string
Set Signature
set script(
s):void
Defined in: js-api/src/entities/func.ts:151
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
tags
Get Signature
get tags():
string[]
Defined in: js-api/src/entities/func.ts:62
Function tags. Every function kind carries them (scripts, queries, package functions). See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation
Returns
string[]
Set Signature
set tags(
tags):void
Defined in: js-api/src/entities/func.ts:63
Parameters
| Parameter | Type |
|---|---|
tags | string[] |
Returns
void
Inherited from
topMenu
Get Signature
get topMenu():
string|null
Defined in: js-api/src/entities/func.ts:58
The main-menu path the function is registered under (//top-menu: Bio | Analyze | MSA...),
or null; the way to tell which function a menu item runs.
Returns
string | null
Inherited from
type
Get Signature
get type():
string
Defined in: js-api/src/entities/func.ts:39
Returns
string
Inherited from
updatedOn
Get Signature
get updatedOn():
Dayjs|null
Defined in: js-api/src/entities/entity.ts:51
Time when entity was updated *
Returns
Dayjs | null
Inherited from
Methods
apply()
apply(
parameters?):Promise<any>
Defined in: js-api/src/entities/func.ts:89
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[] | {[name: string]: any; } |
Returns
Promise<any>
Inherited from
applySync()
applySync(
parameters?):any
Defined in: js-api/src/entities/func.ts:105
Executes the function synchronously, and returns the result. If the function is asynchronous, throws an exception.
Parameters
| Parameter | Type |
|---|---|
parameters | {[name: string]: any; } |
Returns
any
Inherited from
getProperties()
getProperties():
Promise<{[index:string]:any; }>
Defined in: js-api/src/entities/entity.ts:67
Gets entity properties
Returns
Promise<{[index: string]: any; }>
Inherited from
hasTag()
hasTag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:79
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
newId()
newId():
void
Defined in: js-api/src/entities/entity.ts:31
Generates new id for this entity.
Returns
void
Inherited from
prepare()
prepare(
parameters?):FuncCall
Defined in: js-api/src/entities/func.ts:66
Returns FuncCall object in a stand-by state
Parameters
| Parameter | Type |
|---|---|
parameters | {[name: string]: any; } |
Returns
Inherited from
prepareAsync()
prepareAsync(
parameters?):Promise<FuncCall>
Defined in: js-api/src/entities/func.ts:70
Parameters
| Parameter | Type |
|---|---|
parameters | {[name: string]: any; } |
Returns
Promise<FuncCall>
Inherited from
setProperties()
setProperties(
props):Promise<any>
Defined in: js-api/src/entities/entity.ts:72
Sets entity properties
Parameters
| Parameter | Type |
|---|---|
props | {[index: string]: any; } |
Returns
Promise<any>
Inherited from
tag()
tag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:82
Adds a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
toString()
toString():
string
Defined in: js-api/src/entities/entity.ts:77
Returns a string representing the object
Returns
string
Inherited from
unTag()
unTag(
tag):boolean
Defined in: js-api/src/entities/entity.ts:85
Removes a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
byName()
staticbyName(name):Func
Defined in: js-api/src/entities/func.ts:126
Returns a function with the specified name.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Inherited from
create()
staticcreate(script):Script
Defined in: js-api/src/entities/func.ts:143
Parameters
| Parameter | Type |
|---|---|
script | string |
Returns
Script
find()
staticfind(params?):Func[]
Defined in: js-api/src/entities/func.ts:110
Returns functions with the specified attributes.
Parameters
| Parameter | Type |
|---|---|
params? | { meta?: any; name?: string; package?: string; returnSemType?: string; returnType?: string; tags?: string[]; } |
params.meta? | any |
params.name? | string |
params.package? | string |
params.returnSemType? | string |
params.returnType? | string |
params.tags? | string[] |
Returns
Func[]
Inherited from
findAll()
staticfindAll(params?):Promise<Func[]>
Defined in: js-api/src/entities/func.ts:117
Parameters
| Parameter | Type |
|---|---|
params? | { meta?: any; name?: string; package?: string; returnSemType?: string; returnType?: string; tags?: string[]; } |
params.meta? | any |
params.name? | string |
params.package? | string |
params.returnSemType? | string |
params.returnType? | string |
params.tags? | string[] |
Returns
Promise<Func[]>
Deprecated
Use find: the same result, synchronous, without a server query. Removed in 1.29.
Inherited from
fromParams()
staticfromParams(inputs,outputs,script?):Script
Defined in: js-api/src/entities/func.ts:145
Parameters
| Parameter | Type | Default value |
|---|---|---|
inputs | Property[] | undefined |
outputs | Property[] | undefined |
script | string | '' |
Returns
Script