Package org.apache.iotdb.jdbc

## Class IoTDBDataSource

- java.lang.Object
- - org.apache.iotdb.jdbc.IoTDBDataSource

All Implemented Interfaces:
  `java.sql.Wrapper`, `javax.sql.CommonDataSource`, `javax.sql.DataSource`

    public class IoTDBDataSource
    extends java.lang.Object
    implements javax.sql.DataSource

### Constructor Summary

Constructors
`IoTDBDataSource()`
`IoTDBDataSource​(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.Integer port)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.sql.Connection` `getConnection()`
`java.sql.Connection` `getConnection​(java.lang.String username, java.lang.String password)`
`int` `getLoginTimeout()`
`java.io.PrintWriter` `getLogWriter()`
`java.util.logging.Logger` `getParentLogger()`
`java.lang.String` `getPassword()`
`java.lang.Integer` `getPort()`
`java.lang.String` `getUrl()`
`java.lang.String` `getUser()`
`boolean` `isWrapperFor​(java.lang.Class<?> aClass)`
`void` `setLoginTimeout​(int i)`
`void` `setLogWriter​(java.io.PrintWriter printWriter)`
`void` `setPassword​(java.lang.String password)`
`void` `setPort​(java.lang.Integer port)`
`void` `setUrl​(java.lang.String url)`
`void` `setUser​(java.lang.String user)`
`<T> T` `unwrap​(java.lang.Class<T> aClass)`

### 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 Detail

#### IoTDBDataSource

    public IoTDBDataSource()

#### IoTDBDataSource

    public IoTDBDataSource​(java.lang.String url,
                           java.lang.String user,
                           java.lang.String password,
                           java.lang.Integer port)

### Method Detail

#### getUser

    public java.lang.String getUser()

#### setUser

    public void setUser​(java.lang.String user)

#### getPassword

    public java.lang.String getPassword()

#### setPassword

    public void setPassword​(java.lang.String password)

#### getPort

    public java.lang.Integer getPort()

#### setPort

    public void setPort​(java.lang.Integer port)

#### getUrl

    public java.lang.String getUrl()

#### setUrl

    public void setUrl​(java.lang.String url)

#### getConnection

    public java.sql.Connection getConnection()
                                      throws java.sql.SQLException

Specified by:
  `getConnection` in interface `javax.sql.DataSource`
Throws:
  `java.sql.SQLException`

#### getConnection

    public java.sql.Connection getConnection​(java.lang.String username,
                                             java.lang.String password)

Specified by:
  `getConnection` in interface `javax.sql.DataSource`

#### getLogWriter

    public java.io.PrintWriter getLogWriter()

Specified by:
  `getLogWriter` in interface `javax.sql.CommonDataSource`
Specified by:
  `getLogWriter` in interface `javax.sql.DataSource`

#### setLogWriter

    public void setLogWriter​(java.io.PrintWriter printWriter)

Specified by:
  `setLogWriter` in interface `javax.sql.CommonDataSource`
Specified by:
  `setLogWriter` in interface `javax.sql.DataSource`

#### setLoginTimeout

    public void setLoginTimeout​(int i)

Specified by:
  `setLoginTimeout` in interface `javax.sql.CommonDataSource`
Specified by:
  `setLoginTimeout` in interface `javax.sql.DataSource`

#### getLoginTimeout

    public int getLoginTimeout()

Specified by:
  `getLoginTimeout` in interface `javax.sql.CommonDataSource`
Specified by:
  `getLoginTimeout` in interface `javax.sql.DataSource`

#### getParentLogger

    public java.util.logging.Logger getParentLogger()

Specified by:
  `getParentLogger` in interface `javax.sql.CommonDataSource`

#### unwrap

    public <T> T unwrap​(java.lang.Class<T> aClass)

Specified by:
  `unwrap` in interface `java.sql.Wrapper`

#### isWrapperFor

    public boolean isWrapperFor​(java.lang.Class<?> aClass)

Specified by:
  `isWrapperFor` in interface `java.sql.Wrapper`