Show / Hide Table of Contents

Class JSDataSource

Jurassic class for exposing IWMDataSource functionality to javascript called in a decision model.

Inheritance
object
ObjectInstance
JSDataSource
Inherited Members
ObjectInstance.HasProperty(object)
ObjectInstance.GetPropertyValue(uint)
ObjectInstance.GetPropertyValue(uint, object)
ObjectInstance.GetPropertyValue(object)
ObjectInstance.GetPropertyValue(object, object)
ObjectInstance.TryGetPropertyValue(object, out object)
ObjectInstance.GetPropertyValue(PropertyReference)
ObjectInstance.GetOwnPropertyDescriptor(uint)
ObjectInstance.GetOwnPropertyDescriptor(object)
ObjectInstance.GetMethod(object)
ObjectInstance.SetPropertyValue(uint, object, bool)
ObjectInstance.SetPropertyValue(uint, object, object, bool)
ObjectInstance.SetPropertyValue(object, object, bool)
ObjectInstance.SetPropertyValue(object, object, object, bool)
ObjectInstance.SetPropertyValue(PropertyReference, object, bool)
ObjectInstance.SetPropertyValue(PropertyReference, object, object, bool)
ObjectInstance.Delete(uint, bool)
ObjectInstance.Delete(object, bool)
ObjectInstance.DefineProperty(object, PropertyDescriptor, bool)
ObjectInstance.InitializeProperties(IEnumerable<PropertyNameAndValue>)
ObjectInstance.InitializeMissingProperty(object, PropertyAttributes)
ObjectInstance.CallMemberFunction(object, params object[])
ObjectInstance.TryCallMemberFunction(out object, object, params object[])
ObjectInstance.ToString()
ObjectInstance.HasOwnProperty(ScriptEngine, object, object)
ObjectInstance.IsPrototypeOf(ScriptEngine, object, object)
ObjectInstance.PropertyIsEnumerable(ScriptEngine, object, object)
ObjectInstance.ToLocaleString()
ObjectInstance.ValueOf()
ObjectInstance.ToStringJS(ScriptEngine, object)
ObjectInstance.PopulateFunctions()
ObjectInstance.PopulateFunctions(Type)
ObjectInstance.PopulateFunctions(Type, BindingFlags)
ObjectInstance.PopulateFields()
ObjectInstance.PopulateFields(Type)
ObjectInstance.Engine
ObjectInstance.Prototype
ObjectInstance.this[object]
ObjectInstance.this[uint]
ObjectInstance.this[int]
ObjectInstance.Properties
ObjectInstance.OwnKeys
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Quantellia.WMServer.Execution.Model.JS
Assembly: WMServer.dll
Syntax
public class JSDataSource : ObjectInstance

Constructors

JSDataSource(ObjectInstance)

Jurassic constructor.

Declaration
public JSDataSource(ObjectInstance prototype)
Parameters
Type Name Description
ObjectInstance prototype

Properties

ConnectionString

The connection string to the database of the datasource represented by this class.

Declaration
[JSProperty]
public string ConnectionString { get; set; }
Property Value
Type Description
string

FullPathName

The FullPathName of the dataSource represented by this class.

Declaration
[JSProperty]
public string FullPathName { get; set; }
Property Value
Type Description
string

Name

The name of the datasource represented by this class.

Declaration
[JSProperty]
public string Name { get; set; }
Property Value
Type Description
string

RegisteredType

The string used to register this data source type in RegisterWMDataSourceType(string, Type) of the datasource represented by this class.

Declaration
[JSProperty]
public string RegisteredType { get; set; }
Property Value
Type Description
string

UserID

The UserID of the principal calling WMClass methods.

Declaration
public string UserID { get; set; }
Property Value
Type Description
string

UserType

The UserType of the principal calling WMClass methods.

Declaration
public string UserType { get; set; }
Property Value
Type Description
string

Methods

Read(string, string)

Exposes the ability to read a data source in javascript from a decision model. Call this function in javascript on a JSDataSource instance with, ".read(...)".

Declaration
[JSFunction(Name = "read")]
public object Read(string Query, string Action)
Parameters
Type Name Description
string Query

The query to be called on the dataSource. For an SQLServer dataSource, this would be an SQL query.

string Action

The action to perform on the recieved data. Must be "Readtable", "ReadScalar", "ReadNone".

Returns
Type Description
object

A javascript array of bag of values objects representing the returned table, a native javascript value, such as a string or number, or null.

Read(string, string, ObjectInstance)

Exposes the ability to read a data source in javascript from a decision model. Call this function in javascript on a JSDataSource instance with, ".read(...)".

Declaration
[JSFunction(Name = "read")]
public object Read(string Query, string Action, ObjectInstance parameters)
Parameters
Type Name Description
string Query

The query to be called on the dataSource. For an SQLServer dataSource, this would be an SQL query.

string Action

The action to perform on the recieved data. Must be "Readtable", "ReadScalar", "ReadNone".

ObjectInstance parameters

The parameters to be passed into the query represented as a javascript bag of values. Do not pass null into this parameter. If there are no parameters to be passed then utilize the parameterless version of this method.

Returns
Type Description
object

A javascript array of bag of values objects representing the returned table, a native javascript value, such as a string or number, or null.

In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 11/16/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE