public class SQLLib
extends java.lang.Object
| Constructor and Description |
|---|
SQLLib() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildCreateStatementFor(java.sql.Connection connexion,
java.lang.String tableName)
Returns a String containing a create table statement for the given table
on the given connection.
|
static java.lang.String |
buildCreateStatementFor(java.sql.ResultSet results,
java.lang.String tableName)
Returns a String containing a create table statement for the given table
on the given connection.
|
static java.lang.String |
convert(java.lang.Object victim)
Does smart conversion on objects to turn them into SQL-compatible
strings.
|
static java.lang.String |
convertAndQuote(java.lang.Object victim)
Does smart conversion on objects to turn them into SQL-compatible values.
|
static java.lang.String |
getDriverForType(java.lang.String type)
Gives you the class name for a driver based on a simpler "type" of
database.
|
static DatabaseConnectionConfig |
getNamedConfig(java.lang.String name) |
static java.lang.String |
makeURL(java.lang.String type,
java.lang.String server,
java.lang.String database,
java.lang.String databasePath,
java.lang.String properties) |
static boolean |
sqlTypeRequiresLength(int sqlType)
Returns true if the type requires a length specification.
|
static java.lang.String |
sqlTypeToMySQLString(int sqlType)
Returns a string representation of the MySQL equivalent of an SQL column
type ID code.
|
static java.lang.String |
sqlTypeToMySQLString(int sqlType,
int size)
Returns a string representation of the MySQL equivalent of an SQL column
type ID code.
|
static java.lang.String |
sqlTypeToString(int sqlType)
Returns a string representation of an SQL column type ID code.
|
static java.util.Set |
tablesInQuery(java.lang.String query) |
public static DatabaseConnectionConfig getNamedConfig(java.lang.String name)
public static java.lang.String getDriverForType(java.lang.String type)
public static java.lang.String makeURL(java.lang.String type,
java.lang.String server,
java.lang.String database,
java.lang.String databasePath,
java.lang.String properties)
public static java.lang.String convert(java.lang.Object victim)
public static java.lang.String convertAndQuote(java.lang.Object victim)
public static java.util.Set tablesInQuery(java.lang.String query)
public static java.lang.String buildCreateStatementFor(java.sql.Connection connexion,
java.lang.String tableName)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String buildCreateStatementFor(java.sql.ResultSet results,
java.lang.String tableName)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String sqlTypeToString(int sqlType)
public static java.lang.String sqlTypeToMySQLString(int sqlType)
public static java.lang.String sqlTypeToMySQLString(int sqlType,
int size)
public static boolean sqlTypeRequiresLength(int sqlType)