1.1.1

Table Of Contents
java.sql.Driver Interface
The java.sql.Driver.getPropertyInfo method method returns a DriverPropertyInfo object. In a SQLFire system,
this consists of an array of database connection URL attributes. (See Conguration Properties on page 319.) To
get the DriverPropertyInfo object, request the JDBC driver from the driver manager:
String url = "jdbc:sqlfire:";
Properties info = new Properties();
java.sql.DriverManager.getDriver(url).getPropertyInfo(url, info);
java.sql.DriverManager.getConnection Method
A Java application using the JDBC API establishes a connection to a distributed system by obtaining a Connection
object. The standard way to obtain a Connection object is to call the method DriverManager.getConnection,
which takes a String containing a connection URL. A JDBC connection URL (uniform resource locator) identies
a source of data.
DriverManager.getConnection can take one argument besides a connection URL, a Properties object. You can
use the Properties object to set connection URL attributes.
You can also supply strings representing user names and passwords. When they are supplied, SQLFire checks
whether they are valid for the current system if user authentication is enabled. User names are passed to SQLFire
as authorization identiers, which determine whether the user is authorized for access to the database and
determine the default schema. When the connection is established, if no user is supplied, SQLFire sets the default
schema to APP. If a user is supplied, the default schema is the same as the user name.
SQLFire Connection URL Syntax
A SQLFire connection URL consists of the connection URL protocol (jdbc:) followed by the subprotocol
(sqlfire:) and then optional attributes.
Syntax of Connection URLs for peer-clients
For applications that run in a peer-client, the syntax of the connection URL is
*jdbc:sqlfire:_[;attributes]*_*
In JDBC terminology, sqlre is the subprotocol for connecting to a GemFire
distributed system. The subprotocol is always sqlre and does not vary.
jdbc:sqlfire
Specify 0 or more connection URL attributes as detailed in Conguration
Properties on page 319.
attributes
Additional SQL Syntax
SQLFire also supports the following SQL standard syntax to obtain a reference to the current connection in a
server-side JDBC routine:
*jdbc:default:connection*
java.sql.PreparedStatement Interface
SQLFire provides all required JDBC type conversions and additionally allows use of the individual setXXX
methods for each type as if a setObject(Value, JDBCTypeCode) invocation were made. This means
that setString can be used for any built-in target type. Cursors are not supported in SQLFire;
setCursorName method throws an unsupported feature exception.
361
JDBC API