uCosminexus Service Platform, Reception and Adapter Definition Guide
This subsection describes how to define DB adapters.
The SQL operation definition file defines information about the database accessed via the DB adapter in the execution environment and the SQL execution format. This file is used as the base when creating an XML format definition file for a DB adapter.
The following describes how to create the SQL operation definition file.
Create the SQL operation definition file in the XML document format by using a program such as a text editor. If you use any characters that cannot be used for XML documents (such as <, >, or &), you need to escape such characters or use the CDATA section.
Specify elements, attributes, and text data that conform to the W3C XML specifications.
You cannot use the XML name space.
The following shows details of the XML document to be created here.
csa_sql_any-name.xml |
Figure 3-2 Structure of the SQL operation definition file
<?xml version="XML-version" encoding="character-encoding"?>
<DBadapter_SQL_OPERATION dba_separate_transaction="transaction-separate-option">
<DATABASE_DATA>
<DB_NAME dynamic="connection-target-dynamic-change-option">database-reference-name</DB_NAME>
<DB_TYPE>database-type</DB_TYPE>
</DATABASE_DATA>
<SQL_DATA encoding="encoding-and-decoding-format-of-character-binary-data">
<SQL-identifier out_maxOccurs="maximum-number-of-output-search-results">
SQL-instruction <argument-element-name dba_inf="argument-type" data_type="data-format"/>
</SQL-identifier>
:
</SQL_DATA>
<MULTI_SQL_DATA>
<MAX_SQL_NO>maximum-number-of-SQL-statements-that-are-executed-by-one-service-component-request</MAX_SQL_NO>
</MULTI_SQL_DATA>
</DBadapter_SQL_OPERATION>
|
<?xml version="XML-version" encoding="character-encoding"?> |
<DBadapter_SQL_OPERATION dba_separate_transaction="Y|N">
:
</DBadapter_SQL_OPERATION>
|
<DATABASE_DATA>
database-reference-name
database-type
</DATABASE_DATA>
|
<DB_NAME dynamic="Y|N">database-reference-name</DB_NAME> |
<DB_TYPE>database-type</DB_TYPE> |
<SQL_DATA encoding="hexBinary|base64Binary">
SQL-identifier
SQL-statement
</SQL_DATA>
|
<SQL-identifier out_maxOccurs="maximum-number-of-output-search-results">
SQL-statement
</SQL-identifier>
:
|
SQL-instruction <argument-element-name dba_inf="argument-type" data_type="data-format"/> |
Table 3-3 Data types that can be searched for by using SELECT (for HiRDB)
| HiRDB data type | Searchable |
|---|---|
| For HiRDB Type4 JDBC Driver | |
| INT [EGER] | Y |
| SMALLINT | Y |
| [LARGE] DEC [IMAL] NUMERIC |
Y |
| FLOAT DOUBLE PRECISION |
Y |
| SMALLFLT REAL |
Y |
| CHAR [ACTER] | Y |
| VARCHAR CHAR [ACTER] VARYING |
Y |
| NCHAR NATIONAL CHAR |
Y |
| NVARCHAR NATIONAL CHAR [ACTER] VARYING NCHAR VARYING |
Y |
| MCHAR | Y |
| MVARCHAR | Y |
| DATE | Y |
| TIME | Y |
| TIMESTAMP | Y |
| INTERVAL YEAR TO DAY | -- |
| INTERVAL HOUR TO SECOND | -- |
| BLOB BINARY LARGE OBJECT |
Y |
| BINARY | Y |
| BOOLEAN | -- |
Table 3-4 Data types that can be searched for by using SELECT (for Oracle)
| Oracle data type | Searchable |
|---|---|
| For Oracle JDBC Thin Driver | |
| VARCHAR2 | Y |
| NVARCHAR2 | Y |
| NUMBER | Y |
| LONG | Y |
| DATE | Y#1 |
| BINARY_FLOAT#2 | -- |
| BINARY_DOUBLE#2 | -- |
| TIMESTAMP | -- |
| TIMESTAMP WITH TIME ZONE | -- |
| TIMESTAMP WITH LOCAL TIME ZONE | -- |
| INTERVAL YEAR TO MONTH | -- |
| INTERVAL DAY TO SECOND | -- |
| RAW | Y |
| LONG RAW | Y |
| ROWID | Y |
| UROWID | -- |
| CHAR | Y |
| NCHAR | Y |
| CLOB | Y |
| NCLOB | Y |
| BLOB | Y |
| BFILE | -- |
| User-defined type (object type) | -- |
| User-defined type (REF data type) | -- |
| User-defined type (VARRAY) | -- |
| User-defined type (nested table) | -- |
SELECT TO_CHAR(c_ts) FROM table-name
Table 3-5 Data types that can be specified for data_type (for HiRDB)
| HiRDB data type | Data type that can be specified for data_type | Data type and class that the data to be used for the argument is converted to |
|---|---|---|
| INT [EGER] | INTEGER | int |
| SMALLINT | SMALLINT | short |
| [LARGE] DEC [IMAL] NUMERIC |
DECIMAL | java.math.BigDecimal |
| FLOAT DOUBLE PRECISION |
FLOAT | double |
| SMALLFLT REAL |
REAL | float |
| CHAR [ACTER] | CHAR | java.lang.String |
| NCHAR NATIONAL CHAR |
||
| MCHAR | ||
| VARCHAR CHAR [ACTER] VARYING |
VARCHAR | java.lang.String |
| NVARCHAR NATIONAL CHAR [ACTER] VARYING NCHAR VARYING |
||
| MVARCHAR | ||
| DATE | DATE | java.sql.Date |
| TIME | TIME | java.sql.Time |
| TIMESTAMP | TIMESTAMP | java.sql.Timestamp |
| BLOB BINARY LARGE OBJECT |
LONGVARBINARY | byte[] |
| BINARY | LONGVARBINARY | byte[] |
Table 3-6 Data types that can be specified for data_type (for Oracle)
| Oracle data type | Data type that can be specified for data_type | Data type and class that the data to be used for the argument is converted to |
|---|---|---|
| LONG | LONGVARCHAR | java.io.Reader |
| NUMBER | NUMERIC | java.math.BigDecimal |
| VARCHAR2 | VARCHAR | java.lang.String |
| NVARCHAR2 | -- | |
| ROWID | CHAR | |
| CHAR | CHAR | |
| NCHAR | -- | |
| CLOB | CLOB#1 |
|
| NCLOB | -- | |
| DATE | DATE#2 | java.sql.Date |
| TIME#3 | java.sql.Time | |
| TIMESTAMP#4 | java.sql.Timestamp | |
| RAW | VARBINARY | byte[] |
| LONG RAW | LONGVARBINARY | byte[] |
| BLOB | BLOB | byte[] |
<MULTI_SQL_DATA>
maximum-number-of-SQL-statements-to-be-executed
</MULTI_SQL_DATA>
|
<MAX_SQL_NO>maximum-number-of-SQL-statements-that-are-executed-by-one-service-component-execution-request</MAX_SQL_NO> |
| Order number (INTEGER) |
Customer code (CHAR) | Product code (CHAR) |
Number of orders (INTEGER) |
|---|---|---|---|
| 1 | AA001 | 0001 | 5 |
| 2 | AB002 | 0001 | 1 |
| 3 | AA001 | 0102 | 3 |
| 4 | XA005 | 0103 | 1 |
| 5 | AA001 | 0105 | 1 |
OPERATION1:SELECT * FROM DBA.ORDER_TABLE WHERE <val1> <val2> <val3> OPERATION2:SELECT <val1> SUM(<val2>) FROM DBA.ORDER_TABLE GROUP BY <val3> OPERATION3:INSERT INTO DBA.ORDER_TABLE VALUES(<val1>,<val2>,<val3>,<val4>) |
<?xml version="1.0" encoding="UTF-8" ?>
<DBadapter_SQL_OPERATION>
<DATABASE_DATA>
<DB_NAME>DB_SERVER1</DB_NAME>
<DB_TYPE>HIRDB</DB_TYPE>
</DATABASE_DATA>
<SQL_DATA>
<OPERATION1>
SELECT * FROM DBA.ORDER_TABLE WHERE <val1 dba_inf="column"/>
<val2 dba_inf="preset"/>
<val3 dba_inf="data" data_type="CHAR"/>
</OPERATION1>
<OPERATION2>
SELECT <val1 dba_inf="column"/> SUM(<val2 dba_inf="column"/>)
FROM DBA.ORDER_TABLE GROUP BY <val3 dba_inf="column"/>
</OPERATION2>
<OPERATION3>
INSERT INTO DBA.ORDER_TABLE
VALUES(<val1 dba_inf="data" data_type="INTEGER" />,
<val2 dba_inf="data" data_type="CHAR"/>,
<val3 dba_inf="data" data_type="CHAR"/>,
<val4 dba_inf="data" data_type="INTEGER"/>)
</OPERATION3>
</SQL_DATA>
</DBadapter_SQL_OPERATION>
|
<?xml version="1.0" encoding="UTF-8" ?>
<DBadapter_SQL_OPERATION>
<DATABASE_DATA>
<DB_NAME>DB_SERVER1</DB_NAME>
<DB_TYPE>HIRDB</DB_TYPE>
</DATABASE_DATA>
<SQL_DATA>
<OPERATION1>
SELECT * FROM DBA.ORDER_TABLE WHERE <val1 dba_inf="column"/>
<val2 dba_inf="preset"/>
<val3 dba_inf="data" data_type="CHAR"/>
</OPERATION1>
<OPERATION2>
SELECT <val1 dba_inf="column"/> SUM(<val2 dba_inf="column"/>)
FROM DBA.ORDER_TABLE GROUP BY <val3 dba_inf="column"/>
</OPERATION2>
<OPERATION3>
INSERT INTO DBA.ORDER_TABLE
VALUES(<val1 dba_inf="data" data_type="INTEGER" />,
<val2 dba_inf="data" data_type="CHAR"/>,
<val3 dba_inf="data" data_type="CHAR"/>,
<val4 dba_inf="data" data_type="INTEGER"/>)
</OPERATION3>
</SQL_DATA>
<MULTI_SQL_DATA>
<MAX_SQL_NO>10</MAX_SQL_NO>
</MULTI_SQL_DATA>
</DBadapter_SQL_OPERATION>
|
WSDL is not generated for a DB adapter, so the message format of a service component is also not generated automatically. Therefore, you need to create the message format of the service component (XML format definition file for the DB adapter), and then specify the settings.
To create the XML format definition file for a DB adapter, specify the name of the SQL operation definition file created in (1) Creating the SQL operation definition file for the -o option, and then execute the csamkxmls command.
installation-directory-of-the-service-platform\CSC\bin\csamkxmls -o name-of-the-SQL-operation-definition-file -x name-of-the-XML-format-definition-file-for-DB-adapter |
The following is an example of creating an XML format definition file for a DB adapter.
Figure 3-3 (Example 1) When using the SELECT statement to use a value in the WHERE clause as an argument
Figure 3-4 (Example 2) When using the SELECT statement to use the column names to be acquired, as arguments
Figure 3-5 (Example 3) When using the SELECT statement to use the column names and expressions in the WHERE clause as arguments
To define a DB adapter:
Use the template file provided by the service platform to edit the HITACHI Application Integrated Property File.
To edit the HITACHI Application Integrated Property File:
Table 3-7 Settings in the HITACHI Application Integrated Property File
| Tag | Description | Setting | Can be changed |
Setting example |
|---|---|---|---|---|
| <hitachi-application-all-property> | Root tag | -- | No | -- |
| <ejb-jar> | Opening tag for the definition of information regarding EJB | -- | No | -- |
| <hitachi-session-bean-property> | Opening tag for the definition of the Session Bean attribute | -- | No | -- |
| <resource-ref> | Opening tag for the resource reference#1 definition | -- | No | -- |
| <res-ref-name> | Resource reference name | Database reference name specified for the <DB_NAME> tag in the SQL operation definition file | Yes | DB_SERVER1 |
| <res-sharing-scope> | Specification of whether to share the referenced resource | Specification of whether to share the DB Connector referenced by the DB adapter | Yes | Shareable |
| <linked-to> | Data source display name | Name of the resource adapter specified for the property definition (display-name) of the DB Connector | Yes | For example, DB_Connector_for_HiRDB_Type4_XA or DB_Connector_for_Oracle_XA#2. If you changed display-name, set the new name. |
| </resource-ref> | Closing tag for the resource reference definition | -- | No | -- |
| <container-transaction> | Opening tag for the definition regarding container transaction | -- | No | -- |
| <trans-attribute> | Transaction attribute assigned to the method | Required (inherit the transaction) | Yes | Required#3 |
| </container-transaction> | Closing tag for the definition regarding container transaction | -- | No | -- |
| <session-runtime> | Opening tag for the definition of runtime | -- | No | -- |
| <stateless> | Opening tag for the definition of stateless | -- | No | -- |
| <pooled-instance> | Opening tag for the definition regarding instances in the pool | -- | No | -- |
| <minimum> | Minimum number of instances in the pool | Minimum number of instances in the DB adapter | Yes | 0 or 1 |
| <maximum> | Maximum number of instances in the pool | Maximum number of instances in the DB adapter | Yes | 0 (infinite) or 1 |
| </pooled-instance> | Closing tag for the definition regarding instances in the pool | -- | No | -- |
| </stateless> | Closing tag for the definition of stateless | -- | No | -- |
| </session-runtime> | Closing tag for the definition of runtime | -- | No | -- |
| </hitachi-session-bean-property> | Closing tag for the definition of the Session Bean attribute | -- | No | -- |
| </ejb-jar> | Closing tag for the definition of information regarding EJB | -- | No | -- |
| </hitachi-application-all-property> | Root tag | -- | No | -- |
To perform data transformation of a request message, in the Service Adapter Settings window, set the message to be input from the service requester as the standard message, and in the Data-conversion definition screen, define data transformation. To perform data transformation of a response message, set the standard message for the message returned from the service component, and in the Data-conversion definition screen, define data transformation.
If the message format of the service requester is different from the message format of the DB adapter message, data transformation is required.
In the following cases, specify the standard message format to define data transformation:
For details about data transformation, see Chapter 6. Defining Data Transformation in the manual Service Platform Basic Development Guide.
Set the EAR file when adding a DB adapter. If you need to modify the EAR file after adding a DB adapter, in the Service Adapter Settings window of the DB adapter, replace the EAR file.
To replace the EAR file in the Service Adapter Settings window of the DB adapter:
How to create a service requester (that issues requests to the DB adapter) depends on the type of standard reception that receives request messages. Create a service requester with reference to the creation method for each type of standard reception. The following table describes the reference destinations.
Table 3-8 How to create a service requester (which issues requests to the DB adapter)
| Standard reception type | See: | |
|---|---|---|
| Synchronous reception | Web Service (SOAP1.1) | See 8.2 Service Requester That Sends Requests to a Standard Synchronous Reception (Web Services) (SOAP communication infrastructure) in the manual Service Platform Basic Development Guide. |
| Web Service (SOAP1.2) | See 8.3 Creating a service requester using standard synchronous reception (Web Services) (JAX-WS engine) in the manual Service Platform Basic Development Guide. | |
| Session Bean | See 8.4 Service Requester That Sends Requests to a Standard Synchronous Reception (SessionBean)(JAX-WS engine) in the manual Service Platform Basic Development Guide. | |
| Asynchronous reception | MDB (WS-R) | See 8.5 Service Requester That Sends Requests to a Standard Asynchronous Reception (MDB (WS-R)) in the manual Service Platform Basic Development Guide. |
| MDB (DB queue) | See 8.6 Service Requester That Sends Requests to a Standard Asynchronous Reception (MDB (database queue)) in the manual Service Platform Basic Development Guide. | |
The following subsections describe the DB adapter message formats.
If the message format of a service requester for a DB adapter is different from the message format of a DB adapter message, data transformation is required. For details about data transformation, see Chapter 6. Defining Data Transformation in the manual Service Platform Basic Development Guide.
Create a request message in the XML document format.
Specify the elements, attributes, and text data, by conforming to W3C XML specifications. If you use a character that cannot be used for XML documents (such as <, >, or &), you need to escape such characters or use the CDATA section.
The request message format for when requesting execution of a single SQL statement is different from the request message format for when requesting execution of multiple SQL statements.
The request message format is shown below. Italic characters indicate variable values.
<DBadapter>
<SQL-identifier out_maxOccurs="maximum-number-of-output-search-results">
<DBA_IN_DATA>
<argument-element nulldata="treatment-of-an-empty-element">argument-element-data</argument-element>
:
</DBA_IN_DATA>
</SQL-identifier>
</DBadapter>
|
<DBadapter>
<DBA_MULTI_SQL>
<SQL-identifier out_maxOccurs="maximum-number-of-output-search-results">
<DBA_IN_DATA>
<argument-element nulldata="treatment-of-an-empty-element">argument-element-data</argument-element>
:
</DBA_IN_DATA>
</SQL-identifier>
</DBA_MULTI_SQL>
:
</DBadapter>
|
The table below lists and describes the elements and attributes of the request message. Note that the specification of the elements and attributes differs depending on the setting values in the SQL operation definition file. For details about the SQL operation definition file, see (1) Creating the SQL operation definition file.
Table 3-9 Elements and attributes of the request message
| Element name or attribute name | Type | Description and setting value | Type of setting value | Can be omit |
|---|---|---|---|---|
| DBadapter | Element | This element is the root element, and has the following lower elements:
|
-- | N |
| DBA_MULTI_SQL | Element | This element indicates that the request from a service requester requests execution of multiple SQL statements. Set the input information for the lower elements after SQL-identifier. The maximum number of DBA_MULTI_SQL elements that can be entered is the value set for the MAX_SQL_NO element in the SQL operation definition file.
|
-- | Y |
| SQL-identifier | Element | For SQL-identifier, specify the name of the SQL identifier specified in the SQL operation definition file. Set the input information for the lower elements after DBA_IN_DATA. The attribute includes out_maxOccurs. |
-- | Y |
| out_maxOccurs | Attribute | Specify the maximum number of output search results. Specify 0 or a larger value.
|
xsd:int | Y |
| DBA_IN_DATA | Element | Set the data for the argument elements set in the SQL operation definition file for the lower elements after argument-element. | -- | N |
| argument-element | Element | For argument-element, specify the name of the argument element specified in the SQL operation definition file. The data for the argument element specified in the SQL operation definition file is stored in this element. The attribute includes nulldata.
|
xsd:string or the setting value for data_type# | N |
| nulldata | Attribute | Specify whether the data for the empty element is treated as null when dba_inf (argument type) specified in the SQL operation definition file is data. (You cannot specify this attribute if dba_inf is not data.)
|
xsd:string {Y|N} |
Y |
Table 3-10 Correspondence between the setting values for data_type and the argument element types (for HiRDB)
| Setting value for data_type | Argument element type |
|---|---|
| INTEGER | xsd:int# |
| SMALLINT | xsd:short# |
| DECIMAL | xsd:string |
| FLOAT | xsd:double# |
| REAL | xsd:float# |
| CHAR | xsd:string |
| VARCHAR | xsd:string |
| DATE | xsd:date# |
| TIME | xsd:string |
| TIMESTAMP | xsd:string |
| LONGVARBINARY | xsd:hexBinary |
| xsd:base64Binary |
Table 3-11 Correspondence between the setting values for data_type and the argument element types (for Oracle)
| Setting value for data_type | Argument element type |
|---|---|
| NUMERIC | xsd:string |
| CHAR | xsd:string |
| VARCHAR | xsd:string |
| DATE | xsd:date# |
| TIME | xsd:string |
| TIMESTAMP | xsd:string |
| LONGVARCHAR | xsd:string |
| CLOB | xsd:string |
| VARBINARY | xsd:hexBinary |
| xsd:base64Binary | |
| LONGVARBINARY | xsd:hexBinary |
| xsd:base64Binary | |
| BLOB | xsd:hexBinary |
| xsd:base64Binary |
Note that the values of argument elements set in the request message sent to the DB adapter are treated as shown in the following table.
Table 3-12 Treatment of argument elements in the request message sent to the DB adapter
| Value of the argument element in the request message | Setting value in the SQL operation definition file | Value of the nulldata attribute in the request message | Handling of the argument element | |
|---|---|---|---|---|
| Attribute value dba_inf | Attribute value for data_type | |||
| Empty element | data | -- | Y or |
null |
| Value other than Y or |
Empty character string ("") | |||
| Other than data | -- | -- | Empty character string ("") | |
| Other elements | data | CHAR, VARCHAR, LONGVARCHAR, CLOB | -- | The space characters before and after the value are not deleted. <argument-element> |
| Other than CHAR, VARCHAR, LONGVARCHAR, and CLOB | -- | The space characters before and after the value are deleted. <argument-element> |
||
| Other than data | -- | -- | The space characters before and after the value are not deleted. <argument-element> |
|
A response message is output in the XML document format.
If the search result (e.g., the column name) contains a character that cannot be used for XML documents, such a character is escaped and set in the response message. For example, if the search result contains < or &, these are escaped to < or &, respectively. Therefore, you do not have to escape the data stored in the database.
The response message format is different when responding to an execution request for a single SQL statement is different, from when responding to an execution request for multiple SQL statements.
The response message format is shown below. Italic characters indicate variable values.
<DBadapter>
<SQL-identifier out_maxOccurs="maximum-number-of-output-search-results">
<DBA_IN_DATA>
<argument-element nulldata="treatment-of-an-empty-element">argument-element-data</argument-element>
:
</DBA_IN_DATA>
<DBA_OUT_DATA>
<DBA_ResultSetNo>SQL-return-value</DBA_ResultSetNo>
<DBA_ResultSetXmlNo>number-of-search-results</DBA_ResultSetXmlNo>
<DBA_ResultSetName>
<DBA_ResultColumnName cid="column-number">column-name</DBA_ResultColumnName>
:
</DBA_ResultSetName>
<DBA_ResultSet lid="line-number">
<DBA_ResultColumn cid="column-number">search-result-of-the-relevant-n-th-column</DBA_ResultColumn>
:
</DBA_ResultSet>
:
</DBA_OUT_DATA>
</SQL-identifier>
</DBadapter>
|
<DBadapter>
<DBA_MULTI_SQL>
<SQL-identifier out_maxOccurs="maximum-number-of-output-search-results">
<DBA_IN_DATA>
<argument-element nulldata="treatment-of-an-empty-element">argument-element-data</argument-element>
:
</DBA_IN_DATA>
<DBA_OUT_DATA>
<DBA_ResultSetNo>SQL-return-value</DBA_ResultSetNo>
<DBA_ResultSetXmlNo>number-of-search-results</DBA_ResultSetXmlNo>
<DBA_ResultSetName>
<DBA_ResultColumnName cid="column-number">column-name</DBA_ResultColumnName>
:
</DBA_ResultSetName>
<DBA_ResultSet lid="line-number">
<DBA_ResultColumn cid="column-number">search-result-of-the-relevant-n-th-column</DBA_ResultColumn>
:
</DBA_ResultSet>
:
</DBA_OUT_DATA>
</SQL-identifier>
</DBA_MULTI_SQL>
:
</DBadapter>
|
Note that, if the input information in the request message is 0, the response message is output in the following format:
The following table lists and describes the elements and attributes of the response message.
Table 3-13 Elements and attributes of the response message (service requester for a DB adapter)
| Element name or attribute name | Type | Description and setting value | Type of stored value | Can be omitted |
|---|---|---|---|---|
| DBadapter | Element | This is the root element, and has the following lower elements:
|
-- | N |
| DBA_MULTI_SQL | Element | This element indicates a response to an execution request for multiple SQL statements from the service requester. The input information (information set in the request message) and output information (SQL execution result) are output to the lower elements after SQL-identifier. As many DBA_MULTI_SQL elements as DBA_MULTI_SQL elements (written in the request message) are output. |
-- | N#1 |
| SQL-identifier | Element | The input information (information set in the request message) and output information (SQL execution result) are stored in the lower elements DBA_IN_DATA and DBA_OUT_DATA, respectively. SQL-identifier is the SQL identifier set in the request message. Note that the out_maxOccurs attribute (maximum number of output search results) is stored only when it is set in the request message. |
-- | N |
| DBA_IN_DATA | Element | Input information set in the request message is stored in the lower element of this element. | -- | N |
| DBA_OUT_DATA | Element | Information output when SQL is executed is stored in the lower element. The output information to be stored depends on the executed SQL statement.
|
-- | N |
| DBA_ResultSetNo | Element | The output information to be stored depends on the executed SQL statement.
|
xsd:int | N |
| DBA_ResultSetXmlNo | Element | If the executed SQL instruction is SELECT, among the actual number of search results (DBA_ResultSetNo value), only the number of search results that are stored in this response message is stored. If the DBA_ResultSetNo value is larger than the value specified for out_maxOccurs in the SQL operation definition file or in the request message, the value specified for out_maxOccurs is stored. If the element value to be stored exceeds 2,147,483,647, 2,147,483,647 is stored. |
xsd:int | Y1 |
| DBA_ResultSetName | Element | If the executed SQL instruction is SELECT, the column name of the search result is stored in the lower element DBA_ResultColumnName. Note that, if the search result is 0, this element will not be stored. |
-- | Y2 |
| DBA_ResultColumnName | Element | If the executed SQL instruction is SELECT, the name of the relevant column is stored. Note that, if the resulted column is a column of the database, it is set in column-name format. If the resulted column name has not been acquired, a name that conforms with the specifications of the database to which the SQL statement was issued will be returned. The attribute includes cid. |
xsd:string | Y2 |
| cid | Attribute | Indicates the column number of the value to be stored in DBA_ResultColumnName. | xsd:int | |
| DBA_ResultSet | Element | If the executed SQL instruction is SELECT, the result for each line is stored in the lower element DBA_ResultColumn. Note that, if the search result is 0, this element will not be stored. The attribute includes lid. |
-- | Y2 |
| lid | Attribute | Indicates the line number of the value to be stored in DBA_ResultSet. If the element value to be stored exceeds 2,147,483,647, 2,147,483,647 is stored. |
xsd:int | |
| DBA_ResultColumn | Element | The search result for the n-th column of the relevant line (the line indicated by DBA_ResultSet) will be stored.#2 The attribute includes cid and nulldata. |
xsd:string | Y2 |
| cid | Attribute | Indicates the column number of the value to be stored in DBA_ResultColumn. | xsd:int | |
| nulldata | Attribute | Indicates whether the data stored in DBA_ResultColumn is null. If the data is null, Y is set. If the data is not null, this attribute is not set. |
xsd:string |
SELECT VARCHAR_FORMAT(c_ts, 'YYYY-MONTH-DD HH:MI') FROM table-name |
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.