org.gusdb.wdk.model.implementation
Class PostgreSQL
java.lang.Object
org.gusdb.wdk.model.implementation.PostgreSQL
- All Implemented Interfaces:
- RDBMSPlatformI
public class PostgreSQL
- extends java.lang.Object
- implements RDBMSPlatformI
An implementation of RDBMSPlatformI for PostgreSQL
|
Method Summary |
boolean |
checkTableExists(java.lang.String tableName)
|
java.lang.String |
cleanStringValue(java.lang.String val)
|
void |
close()
|
void |
createResultTable(javax.sql.DataSource dataSource,
java.lang.String tableName,
java.lang.String sql)
Write the output of a query into a table, to which will be added a
column "i" numbering the rows. |
void |
createSequence(java.lang.String sequenceName,
int start,
int increment)
|
void |
dropSequence(java.lang.String sequenceName)
|
int |
dropTable(java.lang.String fullTableName)
|
java.lang.String |
getClobDataType()
|
java.lang.String |
getCurrentDateFunction()
|
javax.sql.DataSource |
getDataSource()
|
java.lang.String |
getMinus()
|
java.lang.String |
getNextId(java.lang.String schemaName,
java.lang.String tableName)
|
java.lang.String |
getNumberDataType()
|
java.lang.String |
getTableAliasAs()
|
java.lang.String |
getTableFullName(java.lang.String schemaName,
java.lang.String tableName)
|
java.lang.String |
getVarcharDataType(int length)
|
void |
init(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.Integer minIdle,
java.lang.Integer maxIdle,
java.lang.Integer maxWait,
java.lang.Integer maxActive,
java.lang.Integer initialSize,
java.lang.String fileName)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PostgreSQL
public PostgreSQL()
getDataSource
public javax.sql.DataSource getDataSource()
- Specified by:
getDataSource in interface RDBMSPlatformI
getTableFullName
public java.lang.String getTableFullName(java.lang.String schemaName,
java.lang.String tableName)
- Specified by:
getTableFullName in interface RDBMSPlatformI
getTableAliasAs
public java.lang.String getTableAliasAs()
- Specified by:
getTableAliasAs in interface RDBMSPlatformI
getNextId
public java.lang.String getNextId(java.lang.String schemaName,
java.lang.String tableName)
throws java.sql.SQLException
- Specified by:
getNextId in interface RDBMSPlatformI
- Throws:
java.sql.SQLException
cleanStringValue
public java.lang.String cleanStringValue(java.lang.String val)
- Specified by:
cleanStringValue in interface RDBMSPlatformI
getNumberDataType
public java.lang.String getNumberDataType()
- Specified by:
getNumberDataType in interface RDBMSPlatformI
getClobDataType
public java.lang.String getClobDataType()
- Specified by:
getClobDataType in interface RDBMSPlatformI
getVarcharDataType
public java.lang.String getVarcharDataType(int length)
getCurrentDateFunction
public java.lang.String getCurrentDateFunction()
- Specified by:
getCurrentDateFunction in interface RDBMSPlatformI
checkTableExists
public boolean checkTableExists(java.lang.String tableName)
throws java.sql.SQLException
- Specified by:
checkTableExists in interface RDBMSPlatformI
- Throws:
java.sql.SQLException
createSequence
public void createSequence(java.lang.String sequenceName,
int start,
int increment)
throws java.sql.SQLException
- Specified by:
createSequence in interface RDBMSPlatformI
- Throws:
java.sql.SQLException
dropSequence
public void dropSequence(java.lang.String sequenceName)
throws java.sql.SQLException
- Specified by:
dropSequence in interface RDBMSPlatformI
- Throws:
java.sql.SQLException
dropTable
public int dropTable(java.lang.String fullTableName)
throws java.sql.SQLException
- Specified by:
dropTable in interface RDBMSPlatformI
- Returns:
- count of removed rows
- Throws:
java.sql.SQLException
createResultTable
public void createResultTable(javax.sql.DataSource dataSource,
java.lang.String tableName,
java.lang.String sql)
throws java.sql.SQLException
- Write the output of a query into a table, to which will be added a
column "i" numbering the rows.
- Specified by:
createResultTable in interface RDBMSPlatformI
- Throws:
java.sql.SQLException
init
public void init(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.Integer minIdle,
java.lang.Integer maxIdle,
java.lang.Integer maxWait,
java.lang.Integer maxActive,
java.lang.Integer initialSize,
java.lang.String fileName)
throws WdkModelException
- Specified by:
init in interface RDBMSPlatformI
- Throws:
WdkModelException
close
public void close()
throws WdkModelException
- Specified by:
close in interface RDBMSPlatformI
- Throws:
WdkModelException
getMinus
public java.lang.String getMinus()
- Specified by:
getMinus in interface RDBMSPlatformI