|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.database.support.BaseJdbc2Node
org.mmbase.module.database.support.Sql92SingleFields
org.mmbase.module.database.support.PostgreSQL
7.2 is the first release of the JDBC Driver that supports the byte data type.
The introduction of this functionality in 7.2 has introduced a change in behavior as compared to previous
releases. In 7.2 the methods getBytes(), setBytes(), getBinaryStream(), and setBinaryStream() operate
on the bytea data type. In 7.1 these methods operated on the OID data type associated with Large Objects.
It is possible to revert the driver back to the old 7.1 behavior by setting the compatible property on the
Connection to a value of 7.1
To use the bytea data type you should simply use the getBytes(), setBytes(), getBinaryStream(), or
setBinaryStream() methods.
To use the Large Object functionality you can use either the LargeObject API provided by the PostgreSQL JDBC
Driver, or by using the getBLOB() and setBLOB() methods.
Important: For PostgreSQL, you must access Large Objects within an SQL transaction. You would open a
transaction by using the setAutoCommit() method with an input parameter of false.
Note: In a future release of the JDBC Driver, the getBLOB() and setBLOB() methods may no longer interact
with Large Objects and will instead work on bytea data types. So it is recommended that you use the LargeObject
API if you intend to use Large Objects.
More info for differences between Postgresql versions:
http://www.postgresql.org/idocs/index.php?jdbc-binary-data.html
Postgresql driver for MMBase
| Field Summary |
| Fields inherited from class org.mmbase.module.database.support.Sql92SingleFields |
allowed2disallowed, disallowed2allowed, mmb |
| Fields inherited from interface org.mmbase.storage.search.SearchQueryHandler |
FEATURE_MAX_NUMBER, FEATURE_OFFSET, SUPPORT_NONE, SUPPORT_NORMAL, SUPPORT_OPTIMAL, SUPPORT_WEAK |
| Constructor Summary | |
PostgreSQL()
Deprecated. |
|
| Method Summary | |
boolean |
addField(MMObjectBuilder bul,
java.lang.String fieldname)
Deprecated. |
boolean |
changeField(MMObjectBuilder bul,
java.lang.String fieldname)
Deprecated. |
boolean |
commit(MMObjectBuilder bul,
MMObjectNode node)
Deprecated. commit this node to the database Has been overridden, since postgresql needs a transaction for storing binaries TODO: verify that this is also needed for 72! |
boolean |
create(MMObjectBuilder bul)
Deprecated. |
protected boolean |
createNumberCheck()
Deprecated. |
boolean |
createObjectTable(java.lang.String notUsed)
Deprecated. is next function nessecary? |
protected boolean |
createSequence()
Deprecated. |
protected java.lang.String |
getDbFieldDef(FieldDefs def,
MMObjectBuilder bul)
Deprecated. |
int |
getDBKey()
Deprecated. Retrieves a new unique number, which can be used to inside objectTableName() table |
protected int |
insertRecord(MMObjectBuilder bul,
java.lang.String owner,
MMObjectNode node)
Deprecated. |
boolean |
removeField(MMObjectBuilder bul,
java.lang.String fieldname)
Deprecated. |
| Methods inherited from class org.mmbase.module.database.support.Sql92SingleFields |
changeMetaData, created, decodeDBnodeField, decodeDBnodeField, drop, getAllowedField, getConnection, getDBByte, getDbFieldType, getDBText, getDisallowedField, getInheritBuilder, getInheritTableName, getMMNodeSearch2SQL, getNumberString, getOTypeString, getOwnerString, getShortedByte, getShortedText, init, insert, isAllowedParentBuilder, isBuilderField, isInheritedField, isReferenceField, numberCheckNameName, objectTableName, registerParentBuilder, removeNode, sequenceTableName, setDBByte, setValuePreparedStatement, updateTable |
| Methods inherited from class org.mmbase.module.database.support.BaseJdbc2Node |
getNodes, getSupportLevel, getSupportLevel, init |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mmbase.module.database.support.MMJdbc2NodeInterface |
created, decodeDBnodeField, decodeDBnodeField, drop, getAllowedField, getConnection, getDBByte, getDBText, getDisallowedField, getMMNodeSearch2SQL, getNumberString, getOTypeString, getOwnerString, getShortedByte, getShortedText, init, insert, isAllowedParentBuilder, registerParentBuilder, removeNode, setDBByte, updateTable |
| Methods inherited from interface org.mmbase.storage.search.SearchQueryHandler |
getNodes, getSupportLevel, getSupportLevel |
| Constructor Detail |
public PostgreSQL()
| Method Detail |
protected boolean createSequence()
createSequence in class Sql92SingleFieldsprotected boolean createNumberCheck()
public boolean create(MMObjectBuilder bul)
create in interface MMJdbc2NodeInterfacecreate in class Sql92SingleFields
protected java.lang.String getDbFieldDef(FieldDefs def,
MMObjectBuilder bul)
getDbFieldDef in class Sql92SingleFields
protected int insertRecord(MMObjectBuilder bul,
java.lang.String owner,
MMObjectNode node)
insertRecord in class Sql92SingleFields
public boolean commit(MMObjectBuilder bul,
MMObjectNode node)
commit in interface MMJdbc2NodeInterfacecommit in class Sql92SingleFields
public boolean addField(MMObjectBuilder bul,
java.lang.String fieldname)
addField in interface MMJdbc2NodeInterfaceaddField in class Sql92SingleFields
public boolean removeField(MMObjectBuilder bul,
java.lang.String fieldname)
removeField in interface MMJdbc2NodeInterfaceremoveField in class Sql92SingleFields
public boolean changeField(MMObjectBuilder bul,
java.lang.String fieldname)
changeField in interface MMJdbc2NodeInterfacechangeField in class Sql92SingleFieldspublic int getDBKey()
getDBKey in interface MMJdbc2NodeInterfacegetDBKey in class Sql92SingleFieldspublic boolean createObjectTable(java.lang.String notUsed)
Sql92SingleFields
createObjectTable in interface MMJdbc2NodeInterfacecreateObjectTable in class Sql92SingleFields
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||