|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.poem.dbms.AnsiStandard org.melati.poem.dbms.Postgresql
public class Postgresql
A Driver for Postgresql. See http://www.postgresql.org/
Field Summary |
---|
Fields inherited from class org.melati.poem.dbms.AnsiStandard |
---|
schema |
Constructor Summary | |
---|---|
Postgresql()
Constructor. |
Method Summary | |
---|---|
boolean |
canDropColumns(Connection con)
Whether this DBMS can drop columns. |
SQLPoemType |
defaultPoemTypeOfColumnMetaData(ResultSet md)
The simplest POEM type corresponding to a JDBC description from the database. |
SQLPoemException |
exceptionForUpdate(Table table,
String sql,
boolean insert,
SQLException e)
An exception appropriate for expressing what really went wrong during a write to the db. |
String |
getBinarySqlDefinition(int size)
Accomodate different treatment of different sized binary data. |
String |
getStringSqlDefinition(int size)
Accomodate String/Text distinction. |
String |
preparedStatementPlaceholder(PoemType type)
Accomodate casting in placeholders. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Postgresql()
Method Detail |
---|
public boolean canDropColumns(Connection con) throws SQLException
con
- the current connection
SQLException
org.melati.poem.dbms.AnsiStandard#canDropColumns(java.sql.Connection)
public String preparedStatementPlaceholder(PoemType type)
preparedStatementPlaceholder
in interface Dbms
preparedStatementPlaceholder
in class AnsiStandard
type
- the type to cast
AnsiStandard.preparedStatementPlaceholder(org.melati.poem.PoemType)
public String getStringSqlDefinition(int size) throws SQLException
getStringSqlDefinition
in interface Dbms
getStringSqlDefinition
in class AnsiStandard
size
- the string length (-1 means no limit)
SQLException
AnsiStandard.getStringSqlDefinition(int)
public String getBinarySqlDefinition(int size) throws SQLException
getBinarySqlDefinition
in interface Dbms
getBinarySqlDefinition
in class AnsiStandard
size
- how big the field is
SQLException
AnsiStandard.getBinarySqlDefinition(int)
public SQLPoemType defaultPoemTypeOfColumnMetaData(ResultSet md) throws SQLException
defaultPoemTypeOfColumnMetaData
in interface Dbms
defaultPoemTypeOfColumnMetaData
in class AnsiStandard
md
- the JDBC metadata
SQLException
- potentiallydefaultPoemTypeOfColumnMetaData(java.sql.ResultSet)
public SQLPoemException exceptionForUpdate(Table table, String sql, boolean insert, SQLException e)
exceptionForUpdate
in interface Dbms
exceptionForUpdate
in class AnsiStandard
table
- The table on which the update was affectedsql
- The operation attempted, or possibly nullinsert
- Whether the operation was an INSERT as
opposed to an UPDATEe
- The raw SQL exception: the routine is meant to
try to interpret e.getMessage if it can
AnsiStandard.exceptionForUpdate(org.melati.poem.Table, java.lang.String, boolean, java.sql.SQLException)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |