Class JSDataSource
Jurassic class for exposing IWMDataSource functionality to javascript called in a decision model.
Inherited Members
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. |