Skip to content

Commit 1abc74e

Browse files
committed
[doc] Add a note about explicitly closing connections
1 parent 8b7abdd commit 1abc74e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/modules/sql/src/main/java/org/exist/xquery/modules/sql/GetConnectionFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* @author <a href="mailto:[email protected]">Adam Retter</a>
6565
*/
6666
public class GetConnectionFunction extends BasicFunction {
67-
private static final FunctionReturnSequenceType RETURN_TYPE = returnsOpt(Type.LONG, "an xs:long representing the connection handle");
67+
private static final FunctionReturnSequenceType RETURN_TYPE = returnsOpt(Type.LONG, "an xs:long representing the connection handle. The connection will be closed (or returned to the pool) automatically when the calling XQuery finishes execution, if you need to return it sooner you can call sql:close-connection#1");
6868
private static final FunctionParameterSequenceType JDBC_PASSWORD_PARAM = param("password", Type.STRING, "The SQL database password");
6969
private static final FunctionParameterSequenceType JDBC_USERNAME_PARAM = param("username", Type.STRING, "The SQL database username");
7070
private static final FunctionParameterSequenceType JDBC_PROPERTIES_PARAM = optParam("properties", Type.ELEMENT, "The JDBC database connection properties in the form <properties><property name=\"\" value=\"\"/></properties>.");

0 commit comments

Comments
 (0)