EnsLib.SQL.InboundAdapter
class EnsLib.SQL.InboundAdapter extends Ens.InboundAdapter, EnsLib.SQL.Common
SQL database polling client adapter. Repeatedly executes a query against a remote database via an ODBC- or JDBC- defined DSN (Data Source Name) and processes each resulting row.Property Inventory
Method Inventory
- GetPersistentValue()
- InitializeLastKeyValue()
- InitializePersistentValue()
- OnInit()
- OnTask()
- OnTearDown()
- SetPersistentValue()
Parameters
parameter DOMAIN = ENSEMBLE;
parameter SERVICEINPUTCLASS = EnsLib.SQL.Snapshot;
parameter SETTINGS = Query:Data,Parameters:Data,ParamSQLTypes:Data,DeleteQuery:Data,KeyFieldName:Data,MaxVarCharLengthAsString:Data,DoNotInterruptResultSet:Data;
These are the production settings for this object
Properties
property DeleteQuery as %String);
If specified, used to delete rows after processing. Must have exactly one parameter for IDKey value
Property methods: DeleteQueryDisplayToLogical(), DeleteQueryGet(), DeleteQueryIsValid(), DeleteQueryLogicalToDisplay(), DeleteQueryLogicalToOdbc(), DeleteQueryNormalize(), DeleteQuerySet()
property DoNotInterruptResultSet as %Boolean [ InitialExpression = 0 ];
When a ResultSet is being processed the framework checks if the service ought to stop
after each Row is processed.
Enabling this setting will mean that all Rows in a ResultSet will be processed by the service before checking if it ought to stop.
This should only be enabled if each row is processed without synchronous dependence on another business host.
It is intended to help where the SQL call that generated the ResultSet is such that all rows returned in the ResultSet are considered immediately processed without a separate SQL update/delete call and hence none of the rows in the ResultSet will be returned by a repeat invocation.
Enabling this setting will mean that all Rows in a ResultSet will be processed by the service before checking if it ought to stop.
This should only be enabled if each row is processed without synchronous dependence on another business host.
It is intended to help where the SQL call that generated the ResultSet is such that all rows returned in the ResultSet are considered immediately processed without a separate SQL update/delete call and hence none of the rows in the ResultSet will be returned by a repeat invocation.
Property methods: DoNotInterruptResultSetDisplayToLogical(), DoNotInterruptResultSetGet(), DoNotInterruptResultSetIsValid(), DoNotInterruptResultSetLogicalToDisplay(), DoNotInterruptResultSetNormalize(), DoNotInterruptResultSetSet()
property KeyFieldName as %String [ InitialExpression = "ID" ];
The name of the IDKey field in the query's resultset. Must be unique (non-reused) over time if DeleteQuery is empty.
Property methods: KeyFieldNameDisplayToLogical(), KeyFieldNameGet(), KeyFieldNameIsValid(), KeyFieldNameLogicalToDisplay(), KeyFieldNameLogicalToOdbc(), KeyFieldNameNormalize(), KeyFieldNameSet()
property ParamSQLTypes as %String);
A comma-separated list of the SQL data types of each parameter used in the query (eg. SQL_CHAR,SQL_INTEGER).
This may be required for the query to execute successfully if the datatypes are not SQL_VARCHAR (the default used when unspecified)
Property methods: ParamSQLTypesDisplayToLogical(), ParamSQLTypesGet(), ParamSQLTypesIsValid(), ParamSQLTypesLogicalToDisplay(), ParamSQLTypesLogicalToOdbc(), ParamSQLTypesNormalize(), ParamSQLTypesSet()
property Parameters as %String (MAXLEN = 1000);
A comma-separated list of parameter value specifiers, if any. These correspond to any replaceable ? parameters in the query string.
% refers to Adapter properties such as %LastKey;
$ refers to Service class properties;
& refers to persistent values saved between invocations.
Property methods: ParametersDisplayToLogical(), ParametersGet(), ParametersIsValid(), ParametersLogicalToDisplay(), ParametersLogicalToOdbc(), ParametersNormalize(), ParametersSet()
property Query as %String) [ Required ];
The Base query string that will be repeatedly executed to look for new rows
Property methods: QueryDisplayToLogical(), QueryGet(), QueryIsValid(), QueryLogicalToDisplay(), QueryLogicalToOdbc(), QueryNormalize(), QuerySet()
Methods
classmethod InitializePersistentValue(pConfigName As %String, pParamName As %String = "%LastKey", pNewValue As %String) as %String
Set persistent value (default name=%LastKey) to new value only if it is currently undefined. Return old value if any.
method OnInit() as %Status
Inherited description: This user callback method is called just after %OnNew()
method OnTask() as %Status
Inherited description: default InboundAdapter behavior: always call ProcessInput on CallInterval
method OnTearDown() as %Status
Inherited description: This user callback method is called just before %OnClose()
Inherited Members
Inherited Properties
- %ClientIOAddr
- %IOAddr
- %JGConnectTimeout
- %JavaGateway
- %WarnedLatest
- %logConnections
- BusinessHost
- CallInterval
- ConnectAttrs
- ConnectTimeout
- Connected
- ConnectionAttributes
- Credentials
- DSN
- ExtraJGClasspaths
- IsUnicodeDLL
- JDBCClasspath
- JDBCDriver
- JGClientConnectSpec
- JGClientEnsClassname
- JGService
- KeepaliveInterval
- MaxVarCharLengthAsString
- RegistryID
- StatementAttrs
- StayConnected
- attrIDs
- updatecount
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- AssignOneSetting()
- BindOutputParameter()
- ClearAllAppData()
- ClearRuntimeAppData()
- ClearStaticAppData()
- Commit()
- Connect()
- ConnectAttrsGet()
- ConnectAttrsSet()
- ConnectJ()
- ConnectedSet()
- ConvertSQLTypeToInt()
- CredentialsSet()
- DSNSet()
- DescribeColumns()
- DescribeParameters()
- Disconnect()
- DisconnectJ()
- DropResultSet()
- DropStatement()
- EnumerateSettingsClose()
- EnumerateSettingsExecute()
- EnumerateSettingsFetch()
- ExecuteProcedure()
- ExecuteProcedureParmArray()
- ExecuteQuery()
- ExecuteQueryParmArray()
- ExecuteUpdate()
- ExecuteUpdateParmArray()
- Fetch()
- FetchAhead()
- GetArgLOBData()
- GetData()
- GetDataW()
- GetErrorList()
- GetLastSQLCode()
- GetParameter()
- GetSettings()
- JDBCClasspathSet()
- MoreResults()
- OnKeepalive()
- Rollback()
- RowCount()
- SetAutoCommit()
- SetConnectAttr()
- SetConnectOption()
- SetStmtOption()
- TestConnection()
- TestConnectionJ()
- Transact()
- addErrorList()
- getConfigObj()
- getProcedureParameters()
- initAdapterJG()
- initJG()
- isNetErr()
- putLOBStream()
- putLOBStreams()