WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:sqlQueryClob
Description:The active:sqlQueryClob service is used to retrieve a Character Large Object from one column in a single row in a relational database table or view.
Id:mod-db:sqlQueryClob
Category:accessor
Identifier Syntax

sqlQueryClob is an accessor using Active URI syntax with the following base identifiers:

Base
active:sqlQueryClob

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
operand
Mandatory
Representation (java.lang.Object)SQL query statement to be executed
configuration
Optional
Representation (java.lang.Object)Connection pool configuration
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use sqlQueryClob accessor you must import the module urn:org:netkernel:mod:db:

<import>
  <uri>urn:org:netkernel:mod:db</uri>
</import>

When a request with the SOURCE verb is issued to active:sqlQueryClob the SQL query in the required operand argument is used with the database connection pool specified in the optional configuration argument. (If the configuration argument is not supplied then the service issues a request for the resource res:/etc/ConfigRDBMS.xml in the current space.) The response representation is returned as a String representation of the requested information.

Because of the nature of a large object, only one can be returned by this service for each request. If more than one column is specified an exception is thrown. If no rows are returned by the query an exception is thrown. If more than one row is returned only the value from the first one is returned.

Example

The following code implements the example query illustrated above.

request = context.createRequest("active:sqlQueryClob");
request.addArgumentByValue("operand", "SELECT clob_column FROM big_stuff WHERE name ='marvin';");
stringValue = context.issueRequest(request);

Limitations

NetKernel reads an entire Character Large Object into memory before returning it from this service. The in-memory size restriction is currently 2 gigabytes due to the size limit of a char[] which underlies the String class in Java.