org.riverock.dbrevision.db.impl
Class PostgreeSqlDatabase
java.lang.Object
org.riverock.dbrevision.db.Database
org.riverock.dbrevision.db.impl.PostgreeSqlDatabase
public class PostgreeSqlDatabase
- extends Database
$Id: PostgreeSqlDatabase.java 1141 2006-12-14 14:43:29Z serg_main $
Method Summary |
void |
addColumn(DbTable table,
DbField field)
|
void |
createForeignKey(DbTable view)
|
void |
createSequence(DbSequence seq)
|
void |
createTable(DbTable table)
|
void |
createView(DbView view)
|
void |
dropConstraint(DbForeignKey impPk)
|
void |
dropSequence(String nameSequence)
|
void |
dropTable(DbTable table)
|
void |
dropTable(String nameTable)
|
byte[] |
getBlobField(ResultSet rs,
String nameField,
int maxLength)
|
String |
getClobField(ResultSet rs,
String nameField)
|
String |
getClobField(ResultSet rs,
String nameField,
int maxLength)
|
String |
getDefaultSchemaName(DatabaseMetaData databaseMetaData)
|
String |
getDefaultTimestampValue()
|
Database.Family |
getFamily()
get family for this adapter |
int |
getMaxLengthStringField()
|
String |
getOnDeleteSetNull()
|
List<DbSequence> |
getSequnceList(String schemaPattern)
|
String |
getStream(ResultSet rs,
String nameField,
int maxLength)
|
List<DbView> |
getViewList(String schemaPattern,
String tablePattern)
|
String |
getViewText(DbView view)
|
boolean |
isBatchUpdate()
Is this db support batch update? |
boolean |
isByteArrayInUtf8()
|
boolean |
isNeedUpdateBracket()
|
boolean |
isSchemaSupports()
|
void |
setBlobField(String tableName,
String fieldName,
byte[] bytes,
String whereQuery,
Object[] objects,
int[] fieldTyped)
|
void |
setLongVarbinary(PreparedStatement ps,
int index,
DbDataFieldData fieldData)
|
void |
setLongVarchar(PreparedStatement ps,
int index,
DbDataFieldData fieldData)
|
boolean |
testExceptionConstraintExists(Exception e)
|
boolean |
testExceptionIndexUniqueKey(Exception e)
|
boolean |
testExceptionIndexUniqueKey(Exception e,
String index)
|
boolean |
testExceptionSequenceExists(Exception e)
|
boolean |
testExceptionTableExists(Exception e)
|
boolean |
testExceptionTableNotFound(Exception e)
|
boolean |
testExceptionViewExists(Exception e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PostgreeSqlDatabase
public PostgreeSqlDatabase(Connection conn)
getMaxLengthStringField
public int getMaxLengthStringField()
- Specified by:
getMaxLengthStringField
in class Database
- Returns:
- - int. Max size of char field
isBatchUpdate
public boolean isBatchUpdate()
- Description copied from class:
Database
- Is this db support batch update?
- Specified by:
isBatchUpdate
in class Database
- Returns:
- true if support
isNeedUpdateBracket
public boolean isNeedUpdateBracket()
- Specified by:
isNeedUpdateBracket
in class Database
isByteArrayInUtf8
public boolean isByteArrayInUtf8()
- Specified by:
isByteArrayInUtf8
in class Database
isSchemaSupports
public boolean isSchemaSupports()
- Specified by:
isSchemaSupports
in class Database
getDefaultSchemaName
public String getDefaultSchemaName(DatabaseMetaData databaseMetaData)
- Specified by:
getDefaultSchemaName
in class Database
getClobField
public String getClobField(ResultSet rs,
String nameField)
- Specified by:
getClobField
in class Database
createTable
public void createTable(DbTable table)
- Specified by:
createTable
in class Database
createForeignKey
public void createForeignKey(DbTable view)
- Specified by:
createForeignKey
in class Database
dropTable
public void dropTable(DbTable table)
- Specified by:
dropTable
in class Database
dropTable
public void dropTable(String nameTable)
- Specified by:
dropTable
in class Database
dropSequence
public void dropSequence(String nameSequence)
- Specified by:
dropSequence
in class Database
dropConstraint
public void dropConstraint(DbForeignKey impPk)
- Specified by:
dropConstraint
in class Database
addColumn
public void addColumn(DbTable table,
DbField field)
- Specified by:
addColumn
in class Database
getOnDeleteSetNull
public String getOnDeleteSetNull()
- Specified by:
getOnDeleteSetNull
in class Database
getDefaultTimestampValue
public String getDefaultTimestampValue()
- Specified by:
getDefaultTimestampValue
in class Database
getViewList
public List<DbView> getViewList(String schemaPattern,
String tablePattern)
- Specified by:
getViewList
in class Database
getSequnceList
public List<DbSequence> getSequnceList(String schemaPattern)
- Specified by:
getSequnceList
in class Database
getViewText
public String getViewText(DbView view)
- Specified by:
getViewText
in class Database
createView
public void createView(DbView view)
- Specified by:
createView
in class Database
createSequence
public void createSequence(DbSequence seq)
- Specified by:
createSequence
in class Database
setLongVarbinary
public void setLongVarbinary(PreparedStatement ps,
int index,
DbDataFieldData fieldData)
- Specified by:
setLongVarbinary
in class Database
setLongVarchar
public void setLongVarchar(PreparedStatement ps,
int index,
DbDataFieldData fieldData)
- Specified by:
setLongVarchar
in class Database
getBlobField
public byte[] getBlobField(ResultSet rs,
String nameField,
int maxLength)
- Specified by:
getBlobField
in class Database
getClobField
public String getClobField(ResultSet rs,
String nameField,
int maxLength)
- Specified by:
getClobField
in class Database
- Parameters:
rs
- result setnameField
- name of fieldmaxLength
- max length of CLOB field
- Returns:
- value of specific table columns
getStream
public String getStream(ResultSet rs,
String nameField,
int maxLength)
throws SQLException,
IOException
- Throws:
SQLException
IOException
testExceptionTableNotFound
public boolean testExceptionTableNotFound(Exception e)
- Specified by:
testExceptionTableNotFound
in class Database
testExceptionIndexUniqueKey
public boolean testExceptionIndexUniqueKey(Exception e,
String index)
- Specified by:
testExceptionIndexUniqueKey
in class Database
testExceptionIndexUniqueKey
public boolean testExceptionIndexUniqueKey(Exception e)
- Specified by:
testExceptionIndexUniqueKey
in class Database
testExceptionTableExists
public boolean testExceptionTableExists(Exception e)
- Specified by:
testExceptionTableExists
in class Database
testExceptionViewExists
public boolean testExceptionViewExists(Exception e)
- Specified by:
testExceptionViewExists
in class Database
testExceptionSequenceExists
public boolean testExceptionSequenceExists(Exception e)
- Specified by:
testExceptionSequenceExists
in class Database
testExceptionConstraintExists
public boolean testExceptionConstraintExists(Exception e)
- Specified by:
testExceptionConstraintExists
in class Database
getFamily
public Database.Family getFamily()
- get family for this adapter
- Specified by:
getFamily
in class Database
- Returns:
- family
setBlobField
public void setBlobField(String tableName,
String fieldName,
byte[] bytes,
String whereQuery,
Object[] objects,
int[] fieldTyped)
- Specified by:
setBlobField
in class Database
Copyright © 2008 Riverock community. All Rights Reserved.