Difference between revisions of "Nexjexpress/PostgreSQL Adapter/Adapter"
(→PostgreSQLAdapter.java) |
|||
(40 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | <big><big> Postgre Project - SQLAdapter Files</big></big> | ||
+ | |||
+ | |||
==SQLAdapter.java== | ==SQLAdapter.java== | ||
#'''Questions''' | #'''Questions''' | ||
Line 11: | Line 14: | ||
|- | |- | ||
| public abstract || boolean appendIdentityColumn(StringBuffer buf, SQLInsert work)|| testNew(), testRanges() || not started || --- | | public abstract || boolean appendIdentityColumn(StringBuffer buf, SQLInsert work)|| testNew(), testRanges() || not started || --- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| public abstract || void appendLiteral(StringBuffer buf, Primitive type, Object value)|| testMatch(), testRead(), testLoad(), testNew(),testUpdate(), testDelete(), testSHaredLocking(), testSchemaUnicodeValidation() || not started || --- | | public abstract || void appendLiteral(StringBuffer buf, Primitive type, Object value)|| testMatch(), testRead(), testLoad(), testNew(),testUpdate(), testDelete(), testSHaredLocking(), testSchemaUnicodeValidation() || not started || --- | ||
Line 40: | Line 37: | ||
| public abstract || void appendInfixHint(StringBuffer buf, Query query)|| no implementation in MySQLAdapter || not started || --- | | public abstract || void appendInfixHint(StringBuffer buf, Query query)|| no implementation in MySQLAdapter || not started || --- | ||
|- | |- | ||
− | | public abstract || void bindIdentity(PreparedStatement stmt, SQLInsert work) throws SQLException|| | + | | public abstract || void bindIdentity(PreparedStatement stmt, SQLInsert work) throws SQLException|| no implementation in MySQLAdapter || not started || --- |
|- | |- | ||
− | | public abstract || Object getIdentityValue(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException|| | + | | public abstract || Object getIdentityValue(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException|| testNew(), testRanges() || not started || --- |
|- | |- | ||
| public abstract || boolean appendNoRowsBlock(StringBuffer buf)|| testNew(), testSQLUpdateDenorm() || not started || --- | | public abstract || boolean appendNoRowsBlock(StringBuffer buf)|| testNew(), testSQLUpdateDenorm() || not started || --- | ||
Line 50: | Line 47: | ||
| public abstract || void appendNoRowsEnd(StringBuffer buf)|| no implementation in MySQLAdapter || not started || --- | | public abstract || void appendNoRowsEnd(StringBuffer buf)|| no implementation in MySQLAdapter || not started || --- | ||
|- | |- | ||
− | | public abstract || boolean isBatchSupported()|| | + | | public abstract || boolean isBatchSupported()|| testNew(), testRanges(), testInvalidation(), testUpdate(), testSQLUpdateDenorm(), testDelete() & All testWorkflows || not started || --- |
|- | |- | ||
− | | public abstract || boolean isBatchUpdateCountSupported()|| | + | | public abstract || boolean isBatchUpdateCountSupported()|| same Test Cases as isBatchSupported() || not started || --- |
|- | |- | ||
− | | public abstract || boolean isBatchable(SQLWork work)|| | + | | public abstract || boolean isBatchable(SQLWork work)|| same Test Cases as isBatchSupported() || not started || --- |
|- | |- | ||
| protected abstract || boolean isDateRangeException(SQLException e)|| --- || not started || --- | | protected abstract || boolean isDateRangeException(SQLException e)|| --- || not started || --- | ||
|- | |- | ||
− | | protected abstract || boolean | + | | protected abstract || boolean isDuplicateKeyException(SQLException e)|| testNew() || not started || --- |
|- | |- | ||
− | | protected abstract || | + | | protected abstract || String getDuplicateKeyName(SQLException e)|| testNew() || not started || --- |
|- | |- | ||
− | + | | protected abstract || boolean indexNameMatches(Index index, String sPhysicalName)|| testNew() || not started || --- | |
− | |||
− | | protected abstract || boolean indexNameMatches(Index index, String sPhysicalName)|| | ||
|- | |- | ||
| protected abstract || boolean isDeadlockException(SQLException e)|| --- || not started || --- | | protected abstract || boolean isDeadlockException(SQLException e)|| --- || not started || --- | ||
Line 70: | Line 65: | ||
| protected abstract || boolean isLockTimeoutException(SQLException e)|| --- || not started || --- | | protected abstract || boolean isLockTimeoutException(SQLException e)|| --- || not started || --- | ||
|- | |- | ||
− | | public abstract || SQLSchemaManager createSchemaManager()|| --- || not started || --- | + | | public abstract || String appendStringLengthPrefix(StringBuffer buf, FunctionOperator op) || testRead() || not started || --- |
+ | |- | ||
+ | | public abstract || String appendSubstringPrefix(StringBuffer buf, FunctionOperator op) || testRead() || not started || --- | ||
+ | |- | ||
+ | | public abstract || boolean isLiteral(Primitive type, Object value) || testMatch(), testRead(), testLoad(), testNew(), testDelete(), testSharedLocking() || not started || --- | ||
+ | |- | ||
+ | | protected abstract || long getMaxTime() & long getMinTime()|| testUpdate(), testRanges(), testInvalidation() & All testWorkflows || not started || --- | ||
+ | |- | ||
+ | | public abstract || SQLSchemaManager createSchemaManager()|| All the tests (Through SQLDataTest) || not started || --- | ||
+ | |- | ||
+ | | public abstract || String getTestSQL()|| Before any test and during testMatch() (Gets SQL statement to execute to test that the connection is still valid) || not started || --- | ||
+ | |- | ||
+ | | protected abstract || boolean isQueryTimeoutException(SQLException e)|| testQueryTimeoutException(), testNew() || not started || --- | ||
+ | |- | ||
+ | | protected abstract || Boolean isUnicode(RelationalSchema schema, ResultSet rs, int nColumn) throws SQLException|| no implementation in MySQLAdapter || not started || --- | ||
|- | |- | ||
|} | |} | ||
Line 79: | Line 88: | ||
! Modifier !! Method Name !! Tests Cases !! Status !! ToDo | ! Modifier !! Method Name !! Tests Cases !! Status !! ToDo | ||
|- | |- | ||
− | | protected || boolean isLikeReservedChar(char ch)|| | + | | protected || boolean isLikeReservedChar(char ch)|| no implementation in MySQLAdapter || not started || --- |
|- | |- | ||
| protected || void appendLiteral(StringBuffer buf, String sValue)|| testMatch(), testRead(), testLoad(), testNew(),testUpdate(), testDelete(), testSHaredLocking(), testSchemaUnicodeValidation(), || not started || --- | | protected || void appendLiteral(StringBuffer buf, String sValue)|| testMatch(), testRead(), testLoad(), testNew(),testUpdate(), testDelete(), testSHaredLocking(), testSchemaUnicodeValidation(), || not started || --- | ||
|- | |- | ||
− | | protected || int roundUpListSize(int nSize, int nBindCount)|| | + | | protected || int roundUpListSize(int nSize, int nBindCount)|| no implementation in MySQLAdapter || not started || --- |
|- | |- | ||
− | | protected || int roundUpMaxCount(int nMaxCount)|| | + | | protected || int roundUpMaxCount(int nMaxCount)|| no implementation in MySQLAdapter || not started || --- |
|- | |- | ||
− | | protected || boolean indexNameMatches(String sMetadataName, int nMetaStart, String sPhysicalName, String sPrefix, boolean bCaseInsensitive)|| | + | | protected || boolean indexNameMatches(String sMetadataName, int nMetaStart, String sPhysicalName, String sPrefix, boolean bCaseInsensitive)|| testNew(), no implementation in MySQL, but it's called from <code> indexNameMatches (Index, String) </code> || not started || --- |
|- | |- | ||
|} | |} | ||
Line 96: | Line 105: | ||
! Modifier !! Method Name !! Tests Cases!! after parsing !! before parsing !! Status !! ToDo | ! Modifier !! Method Name !! Tests Cases!! after parsing !! before parsing !! Status !! ToDo | ||
|- | |- | ||
− | | public || void appendLikeEscape(StringBuffer buf)|| testRead(), testUnicodeCharset() ||where A.first_name like ? escape '\\' /* 1 */ || parse("(and (like? firstName \"J*\") || | + | | public || void appendLikeEscape(StringBuffer buf)|| testRead(), testUnicodeCharset() ||where A.first_name like ? escape '\\' /* 1 */ || parse("(and (like? firstName \"J*\") || not started || --- |
+ | |- | ||
+ | | public || void close(Connection connection)|| All the tests (After commit, closes the conncetion) ||---|| --- || not started || --- | ||
+ | |- | ||
+ | | public || SQLConnection getConnection(Query query) throws SQLException|| All the tests ||---|| --- || not started || --- | ||
+ | |- | ||
+ | | public || String getInitialSQL() || Before any test and during testMatch() (Gets SQL statement to execute when a connection is first established) ||---|| --- || not started || --- | ||
+ | |- | ||
+ | | public || Table getMatchJoin(Column column, Pair expression) || testMatch() (see the comment for appendMatchStatement() in SQLAdapter) ||---|| --- || not started || --- | ||
+ | |- | ||
+ | | public || void setFetchSize(PreparedStatement stmt, Query query) throws SQLException || All the tests EXCEPT testUpgrade(), testSQLUpdateDenorm() ||---|| --- || not started || --- | ||
|- | |- | ||
|} | |} | ||
Line 103: | Line 122: | ||
mthodes just added to MySQLAdapter.java | mthodes just added to MySQLAdapter.java | ||
− | protected void appendMatchLiteral(StringBuffer buf, String sValue); | + | :protected void appendMatchLiteral(StringBuffer buf, String sValue); |
− | protected void appendMatchExpression(StringBuffer buf, Object expression, boolean bMax); testMatch() | + | :protected void appendMatchExpression(StringBuffer buf, Object expression, boolean bMax); testMatch() |
+ | :protected String getIndexName(Table table, int nId); testNew() --- see comments for <code>boolean indexNameMatches</code> in SQLAdapter.java |
Latest revision as of 11:38, 17 November 2010
Postgre Project - SQLAdapter Files
SQLAdapter.java
- Questions
- protected interface BindFactory
- protected interface Bind
PostgreSQLAdapter.java
Modifier | Method | Tests Cases | Status | ToDo |
---|---|---|---|---|
public abstract | boolean appendIdentityColumn(StringBuffer buf, SQLInsert work) | testNew(), testRanges() | not started | --- |
public abstract | void appendLiteral(StringBuffer buf, Primitive type, Object value) | testMatch(), testRead(), testLoad(), testNew(),testUpdate(), testDelete(), testSHaredLocking(), testSchemaUnicodeValidation() | not started | --- |
public abstract | void appendMatchStatement(StringBuffer buf, String sAlias, Column column, SQLJoin join, Pair expression) | testMatch() | not started | --- |
public abstract | void appendTypeConversion(StringBuffer buf, Object op,Primitive fromType, Primitive type, SQLGenerator gen) | testRead() | not started | --- |
public abstract | void appendPrefixHint(StringBuffer buf, Query query) | no implementation in MySQLAdapter | not started | --- |
public abstract | void appendSuffixHint(StringBuffer buf, Query query) | at the setup time? | not started | --- |
public abstract | void appendIndexHint(StringBuffer buf, Query query) | testMatch() | not started | --- |
public abstract | void appendTableHint(StringBuffer buf, SQLJoin join, Query query) | no implementation in MySQLAdapter (Look at the Note in the method body) | not started | --- |
public abstract | void appendIdentityPrefix(StringBuffer buf, SQLInsert work) | no implementation in MySQLAdapter | not started | --- |
public abstract | boolean appendIdentityValue(StringBuffer buf, SQLInsert work) | testNew(), testRanges() | not started | --- |
public abstract | boolean appendIdentitySuffix(StringBuffer buf, SQLInsert work) | testNew(), testRanges() | not started | --- |
public abstract | void appendInfixHint(StringBuffer buf, Query query) | no implementation in MySQLAdapter | not started | --- |
public abstract | void bindIdentity(PreparedStatement stmt, SQLInsert work) throws SQLException | no implementation in MySQLAdapter | not started | --- |
public abstract | Object getIdentityValue(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException | testNew(), testRanges() | not started | --- |
public abstract | boolean appendNoRowsBlock(StringBuffer buf) | testNew(), testSQLUpdateDenorm() | not started | --- |
public abstract | void appendNoRowsStart(StringBuffer buf) | no implementation in MySQLAdapter | not started | --- |
public abstract | void appendNoRowsEnd(StringBuffer buf) | no implementation in MySQLAdapter | not started | --- |
public abstract | boolean isBatchSupported() | testNew(), testRanges(), testInvalidation(), testUpdate(), testSQLUpdateDenorm(), testDelete() & All testWorkflows | not started | --- |
public abstract | boolean isBatchUpdateCountSupported() | same Test Cases as isBatchSupported() | not started | --- |
public abstract | boolean isBatchable(SQLWork work) | same Test Cases as isBatchSupported() | not started | --- |
protected abstract | boolean isDateRangeException(SQLException e) | --- | not started | --- |
protected abstract | boolean isDuplicateKeyException(SQLException e) | testNew() | not started | --- |
protected abstract | String getDuplicateKeyName(SQLException e) | testNew() | not started | --- |
protected abstract | boolean indexNameMatches(Index index, String sPhysicalName) | testNew() | not started | --- |
protected abstract | boolean isDeadlockException(SQLException e) | --- | not started | --- |
protected abstract | boolean isLockTimeoutException(SQLException e) | --- | not started | --- |
public abstract | String appendStringLengthPrefix(StringBuffer buf, FunctionOperator op) | testRead() | not started | --- |
public abstract | String appendSubstringPrefix(StringBuffer buf, FunctionOperator op) | testRead() | not started | --- |
public abstract | boolean isLiteral(Primitive type, Object value) | testMatch(), testRead(), testLoad(), testNew(), testDelete(), testSharedLocking() | not started | --- |
protected abstract | long getMaxTime() & long getMinTime() | testUpdate(), testRanges(), testInvalidation() & All testWorkflows | not started | --- |
public abstract | SQLSchemaManager createSchemaManager() | All the tests (Through SQLDataTest) | not started | --- |
public abstract | String getTestSQL() | Before any test and during testMatch() (Gets SQL statement to execute to test that the connection is still valid) | not started | --- |
protected abstract | boolean isQueryTimeoutException(SQLException e) | testQueryTimeoutException(), testNew() | not started | --- |
protected abstract | Boolean isUnicode(RelationalSchema schema, ResultSet rs, int nColumn) throws SQLException | no implementation in MySQLAdapter | not started | --- |
Modifier | Method Name | Tests Cases | Status | ToDo |
---|---|---|---|---|
protected | boolean isLikeReservedChar(char ch) | no implementation in MySQLAdapter | not started | --- |
protected | void appendLiteral(StringBuffer buf, String sValue) | testMatch(), testRead(), testLoad(), testNew(),testUpdate(), testDelete(), testSHaredLocking(), testSchemaUnicodeValidation(), | not started | --- |
protected | int roundUpListSize(int nSize, int nBindCount) | no implementation in MySQLAdapter | not started | --- |
protected | int roundUpMaxCount(int nMaxCount) | no implementation in MySQLAdapter | not started | --- |
protected | boolean indexNameMatches(String sMetadataName, int nMetaStart, String sPhysicalName, String sPrefix, boolean bCaseInsensitive) | testNew(), no implementation in MySQL, but it's called from indexNameMatches (Index, String) |
not started | --- |
Modifier | Method Name | Tests Cases | after parsing | before parsing | Status | ToDo |
---|---|---|---|---|---|---|
public | void appendLikeEscape(StringBuffer buf) | testRead(), testUnicodeCharset() | where A.first_name like ? escape '\\' /* 1 */ | parse("(and (like? firstName \"J*\") | not started | --- |
public | void close(Connection connection) | All the tests (After commit, closes the conncetion) | --- | --- | not started | --- |
public | SQLConnection getConnection(Query query) throws SQLException | All the tests | --- | --- | not started | --- |
public | String getInitialSQL() | Before any test and during testMatch() (Gets SQL statement to execute when a connection is first established) | --- | --- | not started | --- |
public | Table getMatchJoin(Column column, Pair expression) | testMatch() (see the comment for appendMatchStatement() in SQLAdapter) | --- | --- | not started | --- |
public | void setFetchSize(PreparedStatement stmt, Query query) throws SQLException | All the tests EXCEPT testUpgrade(), testSQLUpdateDenorm() | --- | --- | not started | --- |
MySQLAdapter.java
mthodes just added to MySQLAdapter.java
- protected void appendMatchLiteral(StringBuffer buf, String sValue);
- protected void appendMatchExpression(StringBuffer buf, Object expression, boolean bMax); testMatch()
- protected String getIndexName(Table table, int nId); testNew() --- see comments for
boolean indexNameMatches
in SQLAdapter.java