2021.1

Table Of Contents
Method Description Available in File
type
page416
connection object. Preprocessor, Extract, Condition,
Repeat, Action, and Postprocessor
steps
connect()
Method that returns a new database connection object.
connect(url, user, password)
This method returns a new database Connection object after connecting to the given URL and
authenticating the connection with the provided user and password information.
The function accepts arguments as described here:
https://docs.oracle.com/javase/8/docs/api/java/sql/DriverManager.html#getConnection-
java.lang.String-java.lang.String-java.lang.String-.
In the returned Connection object normally any public method should be available. The
returned Connection object is described here:
https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html.
Note
Make sure to close any Connection object created by connect() and any other closable
resources created from the Connection instance (ResultSet, etc.).
url
String that represents a database url of the form jdbc:subprotocol:subname, e.g.
'jdbc:mysql://localhost:3306/mycompany'.
The syntax will be specific to the database, or more precisely the JDBC connector. Currently
Datamapper supports the following JDBC connectors:
l com.mysql.cj.jdbc.Driver
l sun.jdbc.odbc.JdbcOdbcDriver
l com.microsoft.sqlserver.jdbc.SQLServerDriver
l oracle.jdbc.OracleDriver
user
Page 415