# Class TrinoDataSource

java.lang.Object
io.trino.jdbc.TrinoDataSource

All Implemented Interfaces:
  `Wrapper`, `CommonDataSource`, `DataSource`

public class TrinoDataSource extends Object implements DataSource

## Constructor Summary

Constructors
Constructor
Description
`TrinoDataSource()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getCatalog()`
`Connection`
`getConnection()`
`Connection`
`getConnection(String user, String password)`
`Properties`
`getConnectionProperties()`
`int`
`getLoginTimeout()`
`PrintWriter`
`getLogWriter()`
`Logger`
`getParentLogger()`
`String`
`getPassword()`
`String`
`getSchema()`
`String`
`getSessionUser()`
`String`
`getSqlPath()`
`String`
`getUrl()`
`String`
`getUser()`
`boolean`
`isWrapperFor(Class<?> iface)`
`TrinoDataSource`
`setCatalog(String catalog)`
`void`
`setConnectionProperties(Properties properties)`
`void`
`setLoginTimeout(int seconds)`
`void`
`setLogWriter(PrintWriter out)`
`TrinoDataSource`
`setPassword(String password)`
`TrinoDataSource`
`setSchema(String schema)`
`TrinoDataSource`
`setSessionUser(String sessionUser)`
`TrinoDataSource`
`setSqlPath(String sqlPath)`
`DataSource`
`setUrl(String url)`
`TrinoDataSource`
`setUser(String user)`
`<T> T`
`unwrap(Class<T> iface)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface javax.sql.CommonDataSource

`createShardingKeyBuilder`

### Methods inherited from interface javax.sql.DataSource

`createConnectionBuilder`

## Constructor Details

### TrinoDataSource

public TrinoDataSource()

## Method Details

### getConnection

public Connection getConnection() throws SQLException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLException`

### getConnection

public Connection getConnection(String user, String password) throws SQLException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLException`

### getLogWriter

public PrintWriter getLogWriter()

Specified by:
  `getLogWriter` in interface `CommonDataSource`
Specified by:
  `getLogWriter` in interface `DataSource`

### setLogWriter

public void setLogWriter(PrintWriter out)

Specified by:
  `setLogWriter` in interface `CommonDataSource`
Specified by:
  `setLogWriter` in interface `DataSource`

### setLoginTimeout

public void setLoginTimeout(int seconds)

Specified by:
  `setLoginTimeout` in interface `CommonDataSource`
Specified by:
  `setLoginTimeout` in interface `DataSource`

### getLoginTimeout

public int getLoginTimeout()

Specified by:
  `getLoginTimeout` in interface `CommonDataSource`
Specified by:
  `getLoginTimeout` in interface `DataSource`

### getParentLogger

public Logger getParentLogger()

Specified by:
  `getParentLogger` in interface `CommonDataSource`

### setUrl

public DataSource setUrl(String url)

### getUrl

public String getUrl()

### getConnectionProperties

public Properties getConnectionProperties()

### setConnectionProperties

public void setConnectionProperties(Properties properties)

### setUser

public TrinoDataSource setUser(@Nullable String user)

### getUser

public String getUser()

### setPassword

public TrinoDataSource setPassword(@Nullable String password)

### getPassword

public String getPassword()

### setCatalog

public TrinoDataSource setCatalog(@Nullable String catalog)

### getCatalog

public String getCatalog()

### setSchema

public TrinoDataSource setSchema(@Nullable String schema)

### getSchema

public String getSchema()

### setSessionUser

public TrinoDataSource setSessionUser(@Nullable String sessionUser)

### getSessionUser

public String getSessionUser()

### setSqlPath

public TrinoDataSource setSqlPath(@Nullable String sqlPath)

### getSqlPath

public String getSqlPath()

### unwrap

public <T> T unwrap(Class<T> iface) throws SQLException

Specified by:
  `unwrap` in interface `Wrapper`
Throws:
  `SQLException`

### isWrapperFor

public boolean isWrapperFor(Class<?> iface)

Specified by:
  `isWrapperFor` in interface `Wrapper`