|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.db.DB_PostgreSQL
public class DB_PostgreSQL
PostgreSQL Database Port
| Field Summary | |
|---|---|
static int |
DEFAULT_PORT
Default Port |
static String |
DRIVER
Driver class |
| Fields inherited from interface org.compiere.db.AdempiereDatabase |
|---|
CMD_CREATE_DATABASE, CMD_CREATE_USER, CMD_DROP_DATABASE, DEFAULT_CONN_TEST_SQL |
| Constructor Summary | |
|---|---|
DB_PostgreSQL()
PostgreSQL Database |
|
| Method Summary | |
|---|---|
void |
close()
Close |
String |
convertStatement(String oraStatement)
Convert an individual Oracle Style statements to target database statement syntax |
ConnectionPoolDataSource |
createPoolDataSource(CConnection connection)
Create Pooled DataSource (Server) |
static void |
dumpLocks(Connection conn)
Dump table lock info to console for current transaction |
String |
getAlternativeSQL(int reExNo,
String msg,
String sql)
Check and generate an alternative SQL |
Connection |
getCachedConnection(CConnection connection,
boolean autoCommit,
int transactionIsolation)
Get Cached Connection |
String |
getCatalog()
Get JDBC Catalog |
String[] |
getCommands(int cmdType)
Get SQL Commands |
String |
getConnectionURL(CConnection connection)
Get Database Connection String. |
String |
getConnectionURL(String dbHost,
int dbPort,
String dbName,
String userName)
Get Connection URL |
String |
getConnectionURL(String connectionURL,
String userName)
Get Database Connection String |
String |
getConstraintType(Connection conn,
String tableName,
String IXName)
Get constraint type associated with the index |
Convert |
getConvert()
|
DataSource |
getDataSource(CConnection connection)
Create DataSource (Client) |
String |
getDescription()
Get Database Description |
Driver |
getDriver()
Get and register Database Driver |
Connection |
getDriverConnection(CConnection connection)
Get Connection from Driver |
Connection |
getDriverConnection(String dbUrl,
String dbUid,
String dbPwd)
Get Driver Connection |
String |
getName()
Get Database Name |
RowSet |
getRowSet(ResultSet rs)
Get RowSet |
String |
getSchema()
Get JDBC Schema |
int |
getStandardPort()
Get Standard JDBC Port |
String |
getStatus()
Get Status |
String |
getSystemDatabase(String databaseName)
Get Name of System Database |
String |
getSystemUser()
Get Name of System User |
boolean |
isSupported(String sql)
Check if DBMS support the sql statement |
static void |
main(String[] args)
Test |
boolean |
supportsBLOB()
Supports BLOB |
String |
TO_CHAR(String columnName,
int displayType,
String AD_Language)
Create SQL for formatted Date, Number |
String |
TO_DATE(Timestamp time,
boolean dayOnly)
Create SQL TO Date String from Timestamp |
String |
TO_NUMBER(BigDecimal number,
int displayType)
Return number as string for INSERT statements with correct precision |
String |
toString()
String Representation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DRIVER
public static final int DEFAULT_PORT
| Constructor Detail |
|---|
public DB_PostgreSQL()
| Method Detail |
|---|
public Convert getConvert()
getConvert in interface AdempiereDatabasepublic String getName()
getName in interface AdempiereDatabasepublic String getDescription()
getDescription in interface AdempiereDatabasepublic int getStandardPort()
getStandardPort in interface AdempiereDatabase
public Driver getDriver()
throws SQLException
getDriver in interface AdempiereDatabaseSQLExceptionpublic String getConnectionURL(CConnection connection)
getConnectionURL in interface AdempiereDatabaseconnection - Connection Descriptor
public String getConnectionURL(String dbHost,
int dbPort,
String dbName,
String userName)
getConnectionURL in interface AdempiereDatabasedbHost - db HostdbPort - db PortdbName - sb NameuserName - user name
public String getConnectionURL(String connectionURL,
String userName)
getConnectionURL in interface AdempiereDatabaseconnectionURL - Connection URLuserName - user name
public String getCatalog()
getCatalog in interface AdempiereDatabasepublic String getSchema()
getSchema in interface AdempiereDatabasepublic boolean supportsBLOB()
supportsBLOB in interface AdempiereDatabasepublic String toString()
toString in interface AdempiereDatabasetoString in class Objectpublic String getStatus()
getStatus in interface AdempiereDatabasepublic String convertStatement(String oraStatement)
convertStatement in interface AdempiereDatabaseoraStatement -
Exceptionpublic String getSystemUser()
getSystemUser in interface AdempiereDatabasepublic String getSystemDatabase(String databaseName)
getSystemDatabase in interface AdempiereDatabasedatabaseName - database Name
public String TO_DATE(Timestamp time,
boolean dayOnly)
TO_DATE in interface AdempiereDatabasetime - Date to be converteddayOnly - true if time set to 00:00:00
public String TO_CHAR(String columnName,
int displayType,
String AD_Language)
TO_CHAR in interface AdempiereDatabasecolumnName - the column name in the SQLdisplayType - Display TypeAD_Language - 6 character language setting (from Env.LANG_*)
DisplayType,
Env
public String TO_NUMBER(BigDecimal number,
int displayType)
TO_NUMBER in interface AdempiereDatabasenumber - numberdisplayType - display Type
public String[] getCommands(int cmdType)
getCommands in interface AdempiereDatabasecmdType - CMD_*
public RowSet getRowSet(ResultSet rs)
throws SQLException
rs - ResultSet
SQLException
public Connection getCachedConnection(CConnection connection,
boolean autoCommit,
int transactionIsolation)
throws Exception
getCachedConnection in interface AdempiereDatabaseconnection - connectionautoCommit - auto committransactionIsolation - trx isolation
Exceptionpublic DataSource getDataSource(CConnection connection)
getDataSource in interface AdempiereDatabaseconnection - connection
public ConnectionPoolDataSource createPoolDataSource(CConnection connection)
connection - connection
public Connection getDriverConnection(CConnection connection)
throws SQLException
getDriverConnection in interface AdempiereDatabaseconnection - info
SQLException
public Connection getDriverConnection(String dbUrl,
String dbUid,
String dbPwd)
throws SQLException
getDriverConnection in interface AdempiereDatabasedbUrl - URLdbUid - userdbPwd - password
SQLExceptionpublic void close()
close in interface AdempiereDatabase
public String getAlternativeSQL(int reExNo,
String msg,
String sql)
getAlternativeSQL in interface AdempiereDatabase
public String getConstraintType(Connection conn,
String tableName,
String IXName)
getConstraintType in interface AdempiereDatabasepublic boolean isSupported(String sql)
isSupported in interface AdempiereDatabasepublic static void dumpLocks(Connection conn)
conn - public static void main(String[] args)
args - ignored
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||