This project has retired. For details please refer to its Attic page.
JDBCUtils (Lens 2.0.1-beta-incubating API)

org.apache.lens.client.jdbc
Class JDBCUtils

java.lang.Object
  extended by org.apache.lens.client.jdbc.JDBCUtils

public final class JDBCUtils
extends Object

The Class JDBCUtils.


Field Summary
static String URL_PREFIX
          The Constant URL_PREFIX.
 
Method Summary
static int getSQLType(String type)
          Gets the SQL type.
static LensConnectionParams parseUrl(String uri)
          Parses the JDBC Connection URL.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_PREFIX

public static final String URL_PREFIX
The Constant URL_PREFIX.

See Also:
Constant Field Values
Method Detail

parseUrl

public static LensConnectionParams parseUrl(String uri)
                                     throws IllegalArgumentException
Parses the JDBC Connection URL.

The URL format is specified as following :

Examples :-

jdbc:lens://hostname:port/dbname;[optional key value pair of session settings]? [optional configuration settings for connection]#[optional variables to be used in query]

Parameters:
uri - to be used to connect to lens server
Returns:
final list of connection parameters
Throws:
IllegalArgumentException - if URI provided is malformed

getSQLType

public static int getSQLType(String type)
                      throws SQLException
Gets the SQL type.

Parameters:
type - the type
Returns:
the SQL type
Throws:
SQLException - the SQL exception


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.