Semantics : ConnectStatement

ConnectStatement  ::=  connect ( IDENTIFIER )? ( MemberInitList )? to Expr ( , Expr ( , Expr )? )? ;

Used by:  

This statement connect to a database. The connection is saved in a variable, whose name is the first parameter, which is optional. If no name given, it is saved in the default connection, $$con . The JDBC URL and database user name and password are specified following the to keyword.

JDBC driver class names usually do not be loaded explicitly like in Java programs, because JudoScript has knowledge about the following drivers and pick one from the JDBC URL (and the list will grow to cover new ones that come to attention):

JDBC DB IDJDBC Driver Class
cloudscapeCOM.cloudscape.core.JDBCDriver
db2COM.ibm.db2.jdbc.net.DB2Driver
hsqldborg.hsqldb.jdbcDriver
idborg.enhydra.instantdb.jdbc.idbDriver
informix-sqlicom.informix.jdbc.IfxDriver
jtdsorg.sourceforge.jtds.jdbc.Driver
microsoftcom.microsoft.jdbc.sqlserver.SQLServerDriver
msqlcom.imaginary.sql.msql.MsqlDriver
mysqlcom.mysql.jdbc.Driver, org.gjt.mm.mysql.Driver
odbcsun.jdbc.odbc.JdbcOdbcDriver
oracleoracle.jdbc.driver.OracleDriver
pointbasecom.pointbase.jdbc.jdbcUniversalDriver
postgres95postgres95.PGDriver
postgresqlorg.postgresql.Driver, postgresql.Driver
sapdbcom.sap.dbtech.jdbc.DriverSapDB
solidsolid.jdbc.SolidDriver
sqlbasecentura.java.sqlbase.SqlbaseDriver
sybasecom.sybase.jdbc2.jdbc.SybDriver

JDBC connections can take a set of options, which can be specified as the MemberInitList. The valid options are:

Option NameValue Type
driverstring of JDBC driver Java class name
autoCommitboolean
readOnlyboolean
catalogstring
typeMapjava.util.Map
transactionIsolation'transaction_none', 'transaction_read_committed', 'transaction_read_uncommitted', 'transaction_serializable'