Skip to main content

Script

Defined in: src/entities/func.ts:125

Extends

Constructors

Constructor

new Script(dart): Script

Defined in: src/entities/func.ts:130

Parameters

ParameterType
dartany

Returns

Script

Constructs

Script

Overrides

Func.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
auxpublicanyundefinedFunc.auxsrc/entities/func.ts:26
dartpublicanyundefinedFunc.dartsrc/entities/entity.ts:19
optionspublicobjectundefinedFunc.optionssrc/entities/func.ts:27
vecInputTableNamereadonly"in_vec_table"'in_vec_table'-src/entities/func.ts:126
vecOutputTableNamereadonly"out_vec_table"'out_vec_table'-src/entities/func.ts:127

Accessors

author

Get Signature

get author(): any

Defined in: src/entities/entity.ts:59

Who created entity *

Returns

any

Inherited from

Func.author


clientCode

Get Signature

get clientCode(): string

Defined in: src/entities/func.ts:145

Script

Returns

string


createdOn

Get Signature

get createdOn(): Dayjs

Defined in: src/entities/entity.ts:50

Time when entity was created *

Returns

Dayjs

Inherited from

Func.createdOn


description

Get Signature

get description(): string

Defined in: src/entities/func.ts:36

Returns

string

Inherited from

Func.description


entityType

Get Signature

get entityType(): string

Defined in: src/entities/entity.ts:66

Entity type name *

Returns

string

Inherited from

Func.entityType


environment

Get Signature

get environment(): string

Defined in: src/entities/func.ts:157

Environment name. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation

Returns

string

Set Signature

set environment(s): void

Defined in: src/entities/func.ts:158

Parameters
ParameterType
sstring
Returns

void


friendlyName

Get Signature

get friendlyName(): string

Defined in: src/entities/entity.ts:36

Entity friendly name

Returns

string

Set Signature

set friendlyName(x): void

Defined in: src/entities/entity.ts:37

Parameters
ParameterType
xstring
Returns

void

Inherited from

Func.friendlyName


helpUrl

Get Signature

get helpUrl(): string

Defined in: src/entities/func.ts:43

Help URL.

Returns

string

Set Signature

set helpUrl(url): void

Defined in: src/entities/func.ts:45

Parameters
ParameterType
urlstring
Returns

void

Inherited from

Func.helpUrl


id

Get Signature

get id(): string

Defined in: src/entities/entity.ts:28

Entity ID (GUID)

Returns

string

Set Signature

set id(x): void

Defined in: src/entities/entity.ts:29

Parameters
ParameterType
xstring
Returns

void

Inherited from

Func.id


inputs

Get Signature

get inputs(): Property[]

Defined in: src/entities/func.ts:66

Input parameters

Returns

Property[]

Inherited from

Func.inputs


isVectorFunc

Get Signature

get isVectorFunc(): boolean

Defined in: src/entities/func.ts:154

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

Func.isVectorFunc


language

Get Signature

get language(): "r" | "javascript" | "julia" | "octave" | "python" | "nodejs" | "grok" | "pyodide"

Defined in: src/entities/func.ts:148

Script language. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation

Returns

"r" | "javascript" | "julia" | "octave" | "python" | "nodejs" | "grok" | "pyodide"

Set Signature

set language(s): void

Defined in: src/entities/func.ts:149

Parameters
ParameterType
s"r" | "javascript" | "julia" | "octave" | "python" | "nodejs" | "grok" | "pyodide"
Returns

void


name

Get Signature

get name(): string

Defined in: src/entities/entity.ts:40

Entity short name

Returns

string

Set Signature

set name(x): void

Defined in: src/entities/entity.ts:41

Parameters
ParameterType
xstring
Returns

void

Inherited from

Func.name


nqName

Get Signature

get nqName(): string

Defined in: src/entities/entity.ts:44

Entity full-qualified name

Returns

string

Inherited from

Func.nqName


outputs

Get Signature

get outputs(): Property[]

Defined in: src/entities/func.ts:71

Output parameters

Returns

Property[]

Inherited from

Func.outputs


package

Get Signature

get package(): any

Defined in: src/entities/func.ts:48

A package this function belongs to.

Returns

any

Inherited from

Func.package


path

Get Signature

get path(): string

Defined in: src/entities/func.ts:40

Entity path

Returns

string

Inherited from

Func.path


reference

Get Signature

get reference(): string

Defined in: src/entities/func.ts:161

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: src/entities/func.ts:162

Parameters
ParameterType
sstring
Returns

void


sample

Get Signature

get sample(): string

Defined in: src/entities/func.ts:165

Sample table. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation

Returns

string

Set Signature

set sample(s): void

Defined in: src/entities/func.ts:166

Parameters
ParameterType
sstring
Returns

void


script

Get Signature

get script(): string

Defined in: src/entities/func.ts:141

Script

Returns

string

Set Signature

set script(s): void

Defined in: src/entities/func.ts:142

Parameters
ParameterType
sstring
Returns

void


tags

Get Signature

get tags(): string[]

Defined in: src/entities/func.ts:169

Script tags. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation

Returns

string[]

Set Signature

set tags(tags): void

Defined in: src/entities/func.ts:170

Parameters
ParameterType
tagsstring[]
Returns

void


type

Get Signature

get type(): string

Defined in: src/entities/func.ts:38

Returns

string

Inherited from

Func.type


updatedOn

Get Signature

get updatedOn(): Dayjs | null

Defined in: src/entities/entity.ts:53

Time when entity was updated *

Returns

Dayjs | null

Inherited from

Func.updatedOn

Methods

apply()

apply(parameters?): Promise<any>

Defined in: src/entities/func.ts:79

Executes the function with the specified parameters, and returns result. If necessary, the corresponding package will be loaded as part of the call.

Parameters

ParameterType
parametersany[] | {[name: string]: any; }

Returns

Promise<any>

Inherited from

Func.apply


applySync()

applySync(parameters?): any

Defined in: src/entities/func.ts:95

Executes the function synchronously, and returns the result. If the function is asynchronous, throws an exception.

Parameters

ParameterType
parameters{[name: string]: any; }

Returns

any

Inherited from

Func.applySync


getProperties()

getProperties(): Promise<{[index: string]: any; }>

Defined in: src/entities/entity.ts:69

Gets entity properties

Returns

Promise<{[index: string]: any; }>

Inherited from

Func.getProperties


hasTag()

hasTag(tag): boolean

Defined in: src/entities/entity.ts:81

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Func.hasTag


newId()

newId(): void

Defined in: src/entities/entity.ts:32

Generates new id for this entity.

Returns

void

Inherited from

Func.newId


prepare()

prepare(parameters?): FuncCall

Defined in: src/entities/func.ts:56

Returns FuncCall object in a stand-by state

Parameters

ParameterType
parameters{[name: string]: any; }

Returns

FuncCall

Inherited from

Func.prepare


prepareAsync()

prepareAsync(parameters?): Promise<FuncCall>

Defined in: src/entities/func.ts:60

Parameters

ParameterType
parameters{[name: string]: any; }

Returns

Promise<FuncCall>

Inherited from

Func.prepareAsync


setProperties()

setProperties(props): Promise<any>

Defined in: src/entities/entity.ts:74

Sets entity properties

Parameters

ParameterType
props{[index: string]: any; }

Returns

Promise<any>

Inherited from

Func.setProperties


tag()

tag(tag): boolean

Defined in: src/entities/entity.ts:84

Adds a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Func.tag


toString()

toString(): string

Defined in: src/entities/entity.ts:79

Returns a string representing the object

Returns

string

Inherited from

Func.toString


unTag()

unTag(tag): boolean

Defined in: src/entities/entity.ts:87

Removes a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Func.unTag


byName()

static byName(name): Func

Defined in: src/entities/func.ts:116

Returns a function with the specified name.

Parameters

ParameterType
namestring

Returns

Func

Inherited from

Func.byName


create()

static create(script): Script

Defined in: src/entities/func.ts:134

Parameters

ParameterType
scriptstring

Returns

Script


find()

static find(params?): Func[]

Defined in: src/entities/func.ts:100

Returns functions with the specified attributes.

Parameters

ParameterType
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

Func.find


findAll()

static findAll(params?): Promise<Func[]>

Defined in: src/entities/func.ts:107

Parameters

ParameterType
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, it's the same now but does not make a server query and synchronous.

Inherited from

Func.findAll


fromParams()

static fromParams(inputs, outputs, script?): Script

Defined in: src/entities/func.ts:136

Parameters

ParameterTypeDefault value
inputsProperty[]undefined
outputsProperty[]undefined
scriptstring''

Returns

Script