Difference between revisions of "Nexjexpress/PostgreSQL Adapter/process"
Line 1: | Line 1: | ||
==SQLAdapter.java== | ==SQLAdapter.java== | ||
− | + | : Questions: | |
− | + | : protected interface BindFactory | |
+ | : protected interface Bind | ||
==PostgreSQLAdapter.java== | ==PostgreSQLAdapter.java== | ||
Line 7: | Line 8: | ||
: public abstract String appendStringLengthPrefix(StringBuffer buf, FunctionOperator op); | : public abstract String appendStringLengthPrefix(StringBuffer buf, FunctionOperator op); | ||
: public abstract String appendSubstringPrefix(StringBuffer buf, FunctionOperator op); | : public abstract String appendSubstringPrefix(StringBuffer buf, FunctionOperator op); | ||
− | : public abstract boolean isLiteral(Primitive type, Object value) | + | : public abstract boolean isLiteral(Primitive type, Object value); |
: public abstract void appendLiteral(StringBuffer buf, Primitive type, Object value); | : public abstract void appendLiteral(StringBuffer buf, Primitive type, Object value); | ||
: public abstract void appendTypeConversion(StringBuffer buf, Object op,Primitive fromType, Primitive type, SQLGenerator gen); | : public abstract void appendTypeConversion(StringBuffer buf, Object op,Primitive fromType, Primitive type, SQLGenerator gen); | ||
Line 20: | Line 21: | ||
: public abstract void bindIdentity(PreparedStatement stmt, SQLInsert work) throws SQLException; | : public abstract void bindIdentity(PreparedStatement stmt, SQLInsert work) throws SQLException; | ||
: public abstract Object getIdentityValue(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException; | : public abstract Object getIdentityValue(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException; | ||
+ | : public abstract boolean appendNoRowsBlock(StringBuffer buf); | ||
+ | : public abstract void appendNoRowsStart(StringBuffer buf); | ||
+ | : public abstract void appendNoRowsEnd(StringBuffer buf); | ||
+ | : public abstract boolean isBatchSupported(); | ||
+ | : public abstract boolean isBatchUpdateCountSupported(); | ||
+ | : public abstract boolean isBatchable(SQLWork work); | ||
+ | : protected abstract boolean isDateRangeException(SQLException e); | ||
+ | : protected abstract boolean isQueryTimeoutException(SQLException e); | ||
+ | : protected abstract boolean isDuplicateKeyException(SQLException e); | ||
+ | : protected abstract String getDuplicateKeyName(SQLException e); | ||
+ | : protected abstract boolean indexNameMatches(Index index, String sPhysicalName); | ||
+ | : protected abstract boolean isDeadlockException(SQLException e); | ||
+ | : protected abstract boolean isLockTimeoutException(SQLException e); | ||
+ | : public abstract SQLSchemaManager createSchemaManager(); | ||
*Protected methods | *Protected methods | ||
: protected boolean isLikeReservedChar(char ch) | : protected boolean isLikeReservedChar(char ch) | ||
: protected void appendLiteral(StringBuffer buf, String sValue) | : protected void appendLiteral(StringBuffer buf, String sValue) | ||
− | : | + | : protected int roundUpListSize(int nSize, int nBindCount) |
+ | : protected int roundUpMaxCount(int nMaxCount) | ||
+ | : protected boolean indexNameMatches(String sMetadataName, int nMetaStart, String sPhysicalName, String sPrefix, boolean bCaseInsensitive) | ||
: | : | ||
+ | |||
==MySQLAdapter.java== | ==MySQLAdapter.java== |
Revision as of 09:48, 12 November 2010
SQLAdapter.java
- Questions:
- protected interface BindFactory
- protected interface Bind
PostgreSQLAdapter.java
- Abstract methods to work on
- public abstract String appendStringLengthPrefix(StringBuffer buf, FunctionOperator op);
- public abstract String appendSubstringPrefix(StringBuffer buf, FunctionOperator op);
- public abstract boolean isLiteral(Primitive type, Object value);
- public abstract void appendLiteral(StringBuffer buf, Primitive type, Object value);
- public abstract void appendTypeConversion(StringBuffer buf, Object op,Primitive fromType, Primitive type, SQLGenerator gen);
- public abstract void appendPrefixHint(StringBuffer buf, Query query);
- public abstract void appendInfixHint(StringBuffer buf, Query query);
- public abstract void appendSuffixHint(StringBuffer buf, Query query);
- public abstract void appendTableHint(StringBuffer buf, SQLJoin join, Query query);
- public abstract void appendIdentityPrefix(StringBuffer buf, SQLInsert work);
- public abstract boolean appendIdentityColumn(StringBuffer buf, SQLInsert work);
- public abstract boolean appendIdentityValue(StringBuffer buf, SQLInsert work);
- public abstract boolean appendIdentitySuffix(StringBuffer buf, SQLInsert work);
- public abstract void bindIdentity(PreparedStatement stmt, SQLInsert work) throws SQLException;
- public abstract Object getIdentityValue(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException;
- public abstract boolean appendNoRowsBlock(StringBuffer buf);
- public abstract void appendNoRowsStart(StringBuffer buf);
- public abstract void appendNoRowsEnd(StringBuffer buf);
- public abstract boolean isBatchSupported();
- public abstract boolean isBatchUpdateCountSupported();
- public abstract boolean isBatchable(SQLWork work);
- protected abstract boolean isDateRangeException(SQLException e);
- protected abstract boolean isQueryTimeoutException(SQLException e);
- protected abstract boolean isDuplicateKeyException(SQLException e);
- protected abstract String getDuplicateKeyName(SQLException e);
- protected abstract boolean indexNameMatches(Index index, String sPhysicalName);
- protected abstract boolean isDeadlockException(SQLException e);
- protected abstract boolean isLockTimeoutException(SQLException e);
- public abstract SQLSchemaManager createSchemaManager();
- Protected methods
- protected boolean isLikeReservedChar(char ch)
- protected void appendLiteral(StringBuffer buf, String sValue)
- protected int roundUpListSize(int nSize, int nBindCount)
- protected int roundUpMaxCount(int nMaxCount)
- protected boolean indexNameMatches(String sMetadataName, int nMetaStart, String sPhysicalName, String sPrefix, boolean bCaseInsensitive)