|
SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.schema.dict.GenericDictionary
|
+--com.solarmetric.kodo.impl.jdbc.schema.dict.PostgresDictionary
Implementation of the DBDictionary interface for Postgresql.
| Fields inherited from class com.solarmetric.kodo.impl.jdbc.schema.dict.GenericDictionary |
CENTI, DECI, meta, MICRO, MILLI, NANO, NUMBER_FORMAT, SEC |
| Constructor Summary | |
PostgresDictionary()
|
|
| Method Summary | |
Object |
blobFromSQL(ResultSet rs,
int column)
|
Date |
dateFromSQL(ResultSet rs,
int column)
|
Object |
dateToSQL(Date val)
|
String[] |
getAddColumnSQL(Column column)
PostgreSQL has special needs when altering PK columns. |
protected String |
getColumnDeclaration(Column column,
boolean ignorePK)
This method can be overridden if the database does not support standard column declarations, which are in the form: <column-name> <sql-type> [NOT NULL]. |
protected int |
getDatePrecision()
Return the precision to which dates are stored in this type of data store. |
String[] |
getDropColumnSQL(Column column)
PostgreSQL can't deal with dropping columns. |
String |
getPlatform()
Return the title of this database platform, used for display only. |
String |
getValidIndexName(String name)
Limits index names to getMaxIndexNameLength()-1 plus an 'I' that is appended to the end of the given name to avoid SQL keyword conflicts. |
protected void |
setupSQLTypeMap(SQLTypeMap map)
This is the most commonly overridden method when porting to a new database. |
String |
stringToSQL(String string)
PostgreSQL seems to use '\' as a quote character as well as '. |
String |
toSelect(String[] cols,
String[] tables,
String where,
String order,
boolean distinct,
boolean update)
Appends the given pieces using standard SQL. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PostgresDictionary()
| Method Detail |
public String getPlatform()
GenericDictionarygetPlatform in class GenericDictionarypublic String stringToSQL(String string)
stringToSQL in class GenericDictionarypublic Object dateToSQL(Date val)
dateToSQL in class GenericDictionaryprotected void setupSQLTypeMap(SQLTypeMap map)
GenericDictionarysetupSQLTypeMap in class GenericDictionarypublic String[] getDropColumnSQL(Column column)
getDropColumnSQL in class GenericDictionarypublic String[] getAddColumnSQL(Column column)
getAddColumnSQL in class GenericDictionary
protected String getColumnDeclaration(Column column,
boolean ignorePK)
<column-name> <sql-type> [NOT NULL].
Where NOT NULL is appended if it is a primary key column.
public String toSelect(String[] cols,
String[] tables,
String where,
String order,
boolean distinct,
boolean update)
GenericDictionarytoSelect in class GenericDictionarycom.solarmetric.kodo.impl.jdbc.schema.DBDictionarycols - list of values the columns to selecttables - list of the tables to select fromwhere - the WHERE conditions; may be null if noneorder - the ORDER BY conditions; may be null if nonedistinct - if true, this should be a SELECT DISTINCT-equivalent
queryupdate - if true this should be a SELECT FOR
UPDATE-equivalent query
public Object blobFromSQL(ResultSet rs,
int column)
throws SQLException
blobFromSQL in class GenericDictionary
public Date dateFromSQL(ResultSet rs,
int column)
throws SQLException
dateFromSQL in class GenericDictionaryprotected int getDatePrecision()
GenericDictionarygetDatePrecision in class GenericDictionarypublic String getValidIndexName(String name)
getValidIndexName in class GenericDictionary
|
SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||