Connector

little.sql.Connector
class Connector(url: String, user: String, password: String, driverClassName: String, driverClassLoader: ClassLoader) extends DataSource

Defines data source connector.

Value parameters

driverClassLoader

JDBC driver class loader

driverClassName

JDBC driver class name

password

data source password

url

data source url

user

data source user

Attributes

Graph
Supertypes
trait DataSource
trait Wrapper
trait CommonDataSource
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(url: String, user: String, password: String, driverClassName: String, driverClassPath: Seq[URL])

Creates connector.

Creates connector.

Value parameters

driverClassName

JDBC driver class name

driverClassPath

JDBC driver class path

password

data source password

url

data source url

user

data source user

Attributes

Note

If driverClassPath is empty, the driver is loaded using Connector's class loader

def this(url: String, user: String, password: String, driverClassName: String)

Creates connector.

Creates connector.

Value parameters

driverClassName

JDBC driver class name

password

data source password

url

data source url

user

data source user

Attributes

Concrete methods

def getConnection(): Connection

Gets connection.

Gets connection.

Attributes

def getConnection(user: String, password: String): Connection

Gets connection using supplied credentials.

Gets connection using supplied credentials.

Attributes

def getLogWriter(): PrintWriter

Gets log writer.

Gets log writer.

Attributes

def getLoginTimeout(): Int

Gets login timeout.

Gets login timeout.

Attributes

def getParentLogger(): Logger

Gets parent logger.

Gets parent logger.

Attributes

Throws
java.sql.SQLFeatureNotSupportedException

always

def isWrapperFor(kind: Class[_]): Boolean

Tests for wrapper.

Tests for wrapper.

Attributes

def setLogWriter(out: PrintWriter): Unit

Sets log writer.

Sets log writer.

Attributes

def setLoginTimeout(seconds: Int): Unit

Sets login timeout.

Sets login timeout.

Attributes

def unwrap[T](kind: Class[T]): T

Unwraps connector to specified type.

Unwraps connector to specified type.

Attributes

Inherited methods

def createConnectionBuilder(): ConnectionBuilder

Attributes

Inherited from:
DataSource
def createShardingKeyBuilder(): ShardingKeyBuilder

Attributes

Inherited from:
CommonDataSource

Concrete fields

lazy override val toString: String

Returns string representation.

Returns string representation.

Attributes