cniSqlCreateReadOnlyPathExpression または cniSqlCreateModifiablePathExpression ユーティリティー関数を使用して以前に作成された SQLPathExpression を、sqlPathExpression 引数で定義されたとおりに実行します。
CciElement* cniSqlNavigatePath( int* returnCode, CciSqlPathExpression* sqlPathExpression, CciMessage* inputMessageRoot, CciMessage* inputLocalEnvironment, CciMessage* inputExceptionList, CciMessage* outputMessageRoot CciMessage* outputLocalEnvironment, CciMessage* outputExceptionList);
以下の表は、ESQL パス式が受け入れる相関名と、アクセスされるデータとの間のマッピングを示しています。
相関名 | アクセスされるデータ |
---|---|
Environment | フローの単一の Environment ツリー。これはブローカーにより決定され、この API を使用して指定する必要はありません。 |
InputLocalEnvironment | cniSqlNavigatePath への inputLocalEnvironment パラメーター |
OutputLocalEnvironment | cniSqlNavigatePath への outputLocalEnvironment パラメーター |
InputRoot | cniSqlNavigatePath への inputMessageRoot パラメーター |
InputBody | InputRoot の最後の子 |
InputProperties | InputRoot.Properties (InputRoot.Properties は InputRoot の最初の子であり、「Properties」という名前です) |
OutputRoot | cniSqlNavigatePath への outputMessageRoot パラメーター |
InputExceptionList | cniSqlNavigatePath への inputExceptionList パラメーター |
OutputExceptionList | cniSqlNavigatePath への outputExceptionList パラメーター |
Database | cniCreateReadOnlyPathExpression または cniCreateModifyablePathExpression への dataSourceName パラメーターにより識別される ODBC データ・ソース |
InputDestinationList | 旧バージョンとの互換性のある InputLocalEnvironment の同義語 |
OutputDestinationList | 旧バージョンとの互換性のある OutputLocalEnvironment の同義語 |
パスの実際のナビゲート性および妥当性に関する他のすべての規則は、相関名に定義されています。
以前に SQLPathExpression (cniSqlCreateReadOnlyPathExpression または cniSqlCreateModifiablePathExpression の例を参照) を作成してあるなら、以下のコードを使用してターゲット・エレメントにナビゲートできます。
CciElement* targetElement = cniSqlNavigatePath( NULL, ((NODE_CONTEXT_ST *)context)->pathExpression, message, localEnvironment, exceptionList, NULL, /* do not reference any output trees*/ NULL, NULL);