Class Reference
Cache for UNIX 2018.1.2
InterSystems: The power behind what matters   
Documentation  Search
Private  Storage  

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.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 8 8


%ClientIOAddr %IOAddr %JGConnectTimeout %JavaGateway
%WarnedLatest %logConnections BusinessHost CallInterval
ConnectAttrs ConnectTimeout Connected ConnectionAttributes
Credentials DSN DeleteQuery ExtraJGClasspaths
IsUnicodeDLL JDBCClasspath JDBCDriver JGClientConnectSpec
JGClientEnsClassname JGService KeepaliveInterval KeyFieldName
Parameters Query RegistryID StatementAttrs
StayConnected attrIDs updatecount

%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 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
GetPersistentValue GetSettings InitializeLastKeyValue InitializePersistentValue
JDBCClasspathSet MoreResults OnInit OnKeepalive
OnTask OnTearDown Rollback RowCount
SetAutoCommit SetConnectAttr SetConnectOption SetPersistentValue
SetStmtOption TestConnection TestConnectionJ Transact
addErrorList getConfigObj getProcedureParameters initAdapterJG
initJG isNetErr putLOBStream putLOBStreams


• parameter SERVICEINPUTCLASS = "EnsLib.SQL.Snapshot";
• parameter SETTINGS = "Query:Data,Parameters:Data,DeleteQuery:Data,KeyFieldName:Data";
These are the production settings for this object


• property DeleteQuery as %String(MAXLEN="");
If specified, used to delete rows after processing. Must have exactly one parameter for IDKey value
• 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 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 Query as %String(MAXLEN="") [ Required ];
The Base query string that will be repeatedly executed to look for new rows


• classmethod GetPersistentValue(pConfigName As %String, pParamName As %String) as %String
• classmethod InitializeLastKeyValue(pConfigName As %String, pNewLastKey As %String = 0) as %String
• 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
This user callback method is called just after %OnNew()
• method OnTask() as %Status
default InboundAdapter behavior: always call ProcessInput on CallInterval
• method OnTearDown() as %Status
This user callback method is called just before %OnClose()
• classmethod SetPersistentValue(pConfigName As %String, pParamName As %String, pValue As %String) as %String

Copyright © 1997-2019, InterSystems Corporation