sqlBooleanQuery
Make boolean SQL Query on RDBMS
Index > Books > Declarative Development Guide > Reference Library > Accessor Listing > sqlBooleanQuery

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Module

urn:org:ten60:netkernel:mod:db

Definition

Active URI Base

active:sqlBooleanQuery

Format

<instr>
  <type>sqlBooleanQuery</type>
  <operand>
    <sql>SELECT * FROM table WHERE surname='Perry';</sql>
  </operand>
  <configuration>/myconfiguration/configRDBMS.xml</configuration>
  <target>var:result</target>
</instr>

Syntax

ArgumentRulesDescription
typeMandatory sqlBooleanQuery
operandMandatory the <sql> query document
configurationOptional optional configuration document
targetMandatory Fragment OKa boolean result

The sqlBooleanQuery accessor performs a boolean SQL query on an RDBMS using a JDBC connection. The query is provided in the operand as a canonical <sql> document (see example above). The result is boolean. It will be true if the resultset contains any rows otherwise false.

Configuration

By default the configuration will be read from ffpcl:/etc/ConfigRDBMS.xml. The document provides a driver and connection URI (see example below). Alternatively,the configuration can be provided in an optional <configuration> argument - this may be either a URI to a config document or a literal configuration document.

<config>  <rdbms>
    <jdbcDriver>com.mysql.jdbc.Driver</jdbcDriver>
    <jdbcConnection> jdbc:mysql://localhost/mydatabase?user=myusername&amp;password=mypassword </jdbcConnection>
  </rdbms>
</config>
© 2003,2004, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.