Package kotlin.jdbc

Functions for working with SQL databases via JDBC (in kotlin-jdbc module)

See:
          Description

Function Summary
fun getConnection(url: String): Connection
create connection for the specified jdbc url with no credentials
fun getConnection(url: String, info: Map<String, String>): Connection
create connection for the specified jdbc url and properties
fun getConnection(url: String, user: String, password: String): Connection
create connection for the specified jdbc url and credentials
fun <T, S>
S
useSql(block: (S) -> T): T
Uses the statement with the given block then closes the statement
 

Extensions Summary
java.sql.Connection prepare query statement update use
java.sql.PreparedStatement query update
java.sql.ResultSet ensureHasRow get getColumnNames getValues getValuesAsMap iterator map singleDouble singleInt singleLong use
javax.sql.DataSource query statement update useDataSource
 

Package kotlin.jdbc Description

Contents

Function Detail
source

getConnection


 fun getConnection(url: String): Connection

create connection for the specified jdbc url with no credentials

source

getConnection


 fun getConnection(url: String, info: Map<String, String>): Connection

create connection for the specified jdbc url and properties

source

getConnection


 fun getConnection(url: String, user: String, password: String): Connection

create connection for the specified jdbc url and credentials

source

useSql


 fun <T, S> S.useSql(block: (S) -> T): T

Uses the statement with the given block then closes the statement



Copyright © 2010-2012. All Rights Reserved.