Open main menu

CDOT Wiki β

Changes

Nexjexpress/PostgreSQL Adapter/Adapter

3,721 bytes added, 12:38, 17 November 2010
no edit summary
<big><big> Postgre Project - SQLAdapter Files</big></big>
 
 
==SQLAdapter.java==
: #'''Questions''':: protected interface BindFactory:: protected interface Bind
==PostgreSQLAdapter.java==
|+'''Abstract methods to work on'''
! Method Type Modifier !! Method Name !! Tests Cases !! Status !! ToDo
|-
| public abstract || String appendStringLengthPrefixboolean appendIdentityColumn(StringBuffer buf, FunctionOperator opSQLInsert work) || --- testNew(), testRanges() || not started || ---
|-
| public abstract || String appendSubstringPrefix void appendLiteral(StringBuffer buf, FunctionOperator opPrimitive type, Object value) || --- testMatch(), testRead(), testLoad(), testNew(),testUpdate(), testDelete(), testSHaredLocking(), testSchemaUnicodeValidation() || not started || ---
|-
| public abstract || boolean isLiteralvoid appendMatchStatement(Primitive typeStringBuffer buf, Object valueString sAlias, Column column, SQLJoin join, Pair expression) || --- testMatch() || not started || ---
|-
| public abstract || void appendLiteralappendTypeConversion(StringBuffer buf, Object op,Primitive fromType, Primitive type, Object valueSQLGenerator gen)|| testRead() || not started || ---
|-
| public abstract || void appendTypeConversionappendPrefixHint(StringBuffer buf, Object op,Primitive fromType, Primitive type, SQLGenerator genQuery query) || no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void appendPrefixHintappendSuffixHint(StringBuffer buf, Query query) || at the setup time? --- || not started || ---
|-
| public abstract || void appendInfixHintappendIndexHint(StringBuffer buf, Query query) || --- testMatch() || not started || ---
|-
| public abstract || void appendSuffixHintappendTableHint(StringBuffer buf, SQLJoin join, Query query)|| --- no implementation in MySQLAdapter (Look at the Note in the method body) || not started || ---
|-
| public abstract || void appendTableHintappendIdentityPrefix(StringBuffer buf, SQLJoin join, Query querySQLInsert work)|| --- no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void appendIdentityPrefixboolean appendIdentityValue(StringBuffer buf, SQLInsert work)|| --- testNew(), testRanges() || not started || ---
|-
| public abstract || boolean appendIdentityColumnappendIdentitySuffix(StringBuffer buf, SQLInsert work)|| --- testNew(), testRanges() || not started || ---
|-
| public abstract || boolean appendIdentityValuevoid appendInfixHint(StringBuffer buf, SQLInsert workQuery query)|| --- no implementation in MySQLAdapter || not started || ---
|-
| public abstract || boolean appendIdentitySuffixvoid bindIdentity(StringBuffer bufPreparedStatement stmt, SQLInsert work)throws SQLException|| --- no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void bindIdentityObject getIdentityValue(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException|| --- testNew(), testRanges() || not started || ---
|-
| public abstract || Object getIdentityValueboolean appendNoRowsBlock(PreparedStatement stmtStringBuffer buf)|| testNew(), Column column, SQLInsert worktestSQLUpdateDenorm() throws SQLException || not started || ---
|-
| public abstract || boolean appendNoRowsBlockvoid appendNoRowsStart(StringBuffer buf)|| --- no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void appendNoRowsStartappendNoRowsEnd(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 isQueryTimeoutExceptionisDuplicateKeyException(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 isDuplicateKeyExceptionisDeadlockException(SQLException e)|| --- || not started || ---
|-
| protected abstract || String getDuplicateKeyNameboolean isLockTimeoutException(SQLException e)|| --- || not started || ---
|-
| protected public abstract || boolean indexNameMatchesString appendStringLengthPrefix(Index indexStringBuffer buf, String sPhysicalNameFunctionOperator 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 || boolean isDeadlockExceptionlong getMaxTime() & long getMinTime()|| testUpdate(), testRanges(), testInvalidation() & All testWorkflows || not started || ---|-| public abstract || SQLSchemaManager createSchemaManager()|| All the tests (SQLException eThrough 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 isLockTimeoutExceptionisQueryTimeoutException(SQLException e)|| testQueryTimeoutException(), testNew()|| not started || ---
|-
| public protected abstract || SQLSchemaManager createSchemaManagerBoolean isUnicode(RelationalSchema schema, ResultSet rs, int nColumn)throws SQLException|| --- no implementation in MySQLAdapter || not started || ---
|-
|}
{| class="wikitable sortable" border="1" cellpadding="5"
|+ '''Protected methods to work on'''
! Method Type 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 || boolean isLikeReservedCharint roundUpListSize(char chint nSize, int nBindCount)|| no implementation in MySQLAdapter --- || not started || ---
|-
| protected || void appendLiteralint roundUpMaxCount(StringBuffer buf, String sValueint nMaxCount)|| --- no implementation in MySQLAdapter || not started || ---
|-
| protected || int roundUpListSizeboolean indexNameMatches(String sMetadataName, int nSizenMetaStart, String sPhysicalName, String sPrefix, int nBindCountboolean bCaseInsensitive)|| --- testNew(), no implementation in MySQL, but it's called from <code> indexNameMatches (Index, String) </code> || not started || ---|-|}  {| class="wikitable sortable" border="1" cellpadding="5"|+ '''Public methods to work on'''! Modifier !! Method Name !! Tests Cases!! after parsing !! before parsing !! Status !! ToDo
|-
| protected public || int roundUpMaxCountvoid appendLikeEscape(int nMaxCountStringBuffer buf)|| --- testRead(), testUnicodeCharset() ||where A.first_name like ? escape '\\' /* 1 */ || parse("(and (like? firstName \"J*\") || not started || ---
|-
| protected public || boolean indexNameMatchesvoid close(String sMetadataName, int nMetaStartConnection 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 sPhysicalNamegetInitialSQL() || Before any test and during testMatch() (Gets SQL statement to execute when a connection is first established) ||---|| --- || not started || ---|-| public || Table getMatchJoin(Column column, String sPrefixPair expression) || testMatch() (see the comment for appendMatchStatement() in SQLAdapter) ||---|| --- || not started || ---|-| public || void setFetchSize(PreparedStatement stmt, boolean bCaseInsensitiveQuery 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 <code>boolean indexNameMatches</code> in SQLAdapter.java
1
edit