Skip to main content

Script

Extends

Constructors

new Script()

new Script(dart): Script

Parameters

ParameterType
dartany

Returns

Script

Overrides

Func . constructor

Constructs

Script

Source

src/entities.ts:1046

Properties

PropertyModifierTypeDefault valueInherited from
auxpublicanyundefinedFunc.aux
dartpublicanyundefinedFunc.dart
optionspublicobjectundefinedFunc.options
vecInputTableNamereadonly"in_vec_table"'in_vec_table'-
vecOutputTableNamereadonly"out_vec_table"'out_vec_table'-

Accessors

author

get author(): User

Who created entity *

Returns

User

Source

src/entities.ts:124


clientCode

get clientCode(): string

Script

Returns

string

Source

src/entities.ts:1061


createdOn

get createdOn(): Dayjs

Time when entity was created *

Returns

Dayjs

Source

src/entities.ts:115


description

get description(): string

Returns

string

Source

src/entities.ts:259


environment

get environment(): string

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

set environment(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1073


friendlyName

get friendlyName(): string

Entity friendly name

set friendlyName(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:101


helpUrl

get helpUrl(): string

Help URL.

set helpUrl(url): void

Parameters

ParameterType
urlstring

Returns

string

Source

src/entities.ts:266


id

get id(): string

Entity ID (GUID)

set id(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:93


inputs

get inputs(): Property[]

Input parameters

Returns

Property[]

Source

src/entities.ts:289


isVectorFunc

get isVectorFunc(): 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

src/entities.ts:1070


language

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

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

set language(s): void

Parameters

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

Returns

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

Source

src/entities.ts:1064


name

get name(): string

Entity short name

set name(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:105


nqName

get nqName(): string

Entity full-qualified name

Returns

string

Source

src/entities.ts:109


outputs

get outputs(): Property[]

Output parameters

Returns

Property[]

Source

src/entities.ts:294


package

get package(): Package

A package this function belongs to.

Returns

Package

Source

src/entities.ts:271


path

get path(): string

Entity path

Returns

string

Source

src/entities.ts:263


reference

get reference(): string

Reference header parameter. See also: https://datagrok.ai/help/datagrok/concepts/functions/func-params-annotation

set reference(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1077


sample

get sample(): string

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

set sample(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1081


script

get script(): string

Script

set script(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1057


tags

get tags(): string[]

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

set tags(tags): void

Parameters

ParameterType
tagsstring[]

Returns

string[]

Source

src/entities.ts:1085


type

get type(): string

Returns

string

Source

src/entities.ts:261


updatedOn

get updatedOn(): null | Dayjs

Time when entity was updated *

Returns

null | Dayjs

Source

src/entities.ts:118

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

ParameterType
parametersany[] | object

Returns

Promise<any>

Inherited from

Func . apply

Source

src/entities.ts:302


applySync()

applySync(parameters): any

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

Parameters

ParameterType
parametersobject

Returns

any

Inherited from

Func . applySync

Source

src/entities.ts:318


getProperties()

getProperties(): Promise<object>

Gets entity properties

Returns

Promise<object>

Inherited from

Func . getProperties

Source

src/entities.ts:127


hasTag()

hasTag(tag): boolean

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Func . hasTag

Source

src/entities.ts:139


newId()

newId(): void

Generates new id for this entity.

Returns

void

Inherited from

Func . newId

Source

src/entities.ts:97


prepare()

prepare(parameters): FuncCall

Returns FuncCall object in a stand-by state

Parameters

ParameterType
parametersobject

Returns

FuncCall

Inherited from

Func . prepare

Source

src/entities.ts:279


prepareAsync()

prepareAsync(parameters): Promise <FuncCall>

Parameters

ParameterType
parametersobject

Returns

Promise <FuncCall>

Inherited from

Func . prepareAsync

Source

src/entities.ts:283


setProperties()

setProperties(props): Promise<any>

Sets entity properties

Parameters

ParameterType
propsobject

Returns

Promise<any>

Inherited from

Func . setProperties

Source

src/entities.ts:132


tag()

tag(tag): boolean

Adds a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Func . tag

Source

src/entities.ts:142


toString()

toString(): string

Returns a string representing the object

Returns

string

Inherited from

Func . toString

Source

src/entities.ts:137


unTag()

unTag(tag): boolean

Removes a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Func . unTag

Source

src/entities.ts:145


byName()

static byName(name): Func

Returns a function with the specified name.

Parameters

ParameterType
namestring

Returns

Func

Inherited from

Func . byName

Source

src/entities.ts:339


create()

static create(script): Script

Parameters

ParameterType
scriptstring

Returns

Script

Source

src/entities.ts:1050


find()

static find(params?): Func[]

Returns functions with the specified attributes.

Parameters

ParameterType
params?object
params.meta?any
params.name?string
params.package?string
params.returnSemType?string
params.returnType?string
params.tags?string[]

Returns

Func[]

Inherited from

Func . find

Source

src/entities.ts:323


findAll()

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

Parameters

ParameterType
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

Func . findAll

Deprecated

Use find, it's the same now but does not make a server query and synchronous.

Source

src/entities.ts:330


fromParams()

static fromParams(inputs, outputs, script): Script

Parameters

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

Returns

Script

Source

src/entities.ts:1052