SQL-J Language Reference
Page 120 of 121

GETCURRENTCONNECTION()

This built-in function returns the current connection (java.sql.Connection). It is used to pass the current connection to a method invoked within Cloudscape that makes JDBC calls back to the database. This simplifies the coding for user methods and allows you to invoke methods with the same signatures and code in both the client application and Cloudscape. For more information, see Requirements for Database-Side JDBC Methods Using Nested Connections in the Cloudscape Developer's Guide.

Syntax

GETCURRENTCONNECTION()

GETCURRENTCONNECTION() Example

SELECT city.getDistanceFrom(getCurrentConnection(), 35)
FROM Cities