createConnector

@JvmStatic
fun createConnector(dbId: String): Connector


@JvmStatic
fun createConnector(alias: String, dbId: String, driverClassName: String?, driverJarFileName: String?, urlTemplateName: String?, host: String?, port: Int, instance: String?, user: String?, readOnly: Boolean): Connector

Create a connection to database, using the driver jar file name (if there are more drivers), the JDBC URL template name

Return

a Connector class you can use for connecting to database

Parameters

alias
  • a name for the connection

dbId

the database name

driverClassName

is the name of the class to connect to database. Open the Connection Dialog in DbSchema and you will see the class name and driverJarFileName listed there.

driverJarFileName

is the name of the jar driver file under 'Users/CURRENT_USER/.DbSchema/RDBMS_NAME/drivers'. Use null if you have a single driver, or specify the file name if you use multiple drivers.

urlTemplateName

is the name which shows in the Connection Dialog when choosing a connection:'Standard', 'Using Authentication'....

host

the server host name. You should be able to ping this host ('ping hostname')'

port

where the server runs

instance

the name of the database or instance in the database server

user

to connect to

readOnly

connection


@JvmStatic
fun createConnector(alias: String, dbId: String, driverClassName: String?, jdbcURL: String?, userName: String?, password: String?): Connector

Create a connection using the given JDBC URL. The DBMS will be the same as the project DBMS.

Return

The created connection.

Parameters

alias

The connection alias, can be any pseud-name.

driverClassName

The class name of the driver, you can find it in the JDBC combo of the connection dialog.

jdbcURL

The JDBC URL. Same can be used if you enter 'Edit Manually' in DbSchema.

userName

The database username.

password

The database password.


@JvmStatic
fun createConnector(alias: String, dbId: String, host: String?, port: Int, driverClassName: String?, instance: String?, user: String?): Connector

Create a connector with for the same Rdbms as the model. The driver is the fist found in the list of drivers.

Return

the connector

Parameters

alias

of the connector in the project connectors list

host

of the database

port

of the database

driverClassName

to use

instance

of the database

user

in the database