Open main menu

CDOT Wiki β

Changes

Nexjexpress/PostgreSQL Adapter/Adapter

3,996 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'''
! Modifier !! Method Type !! Method Name 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 || String appendStringLengthPrefix void appendPrefixHint(StringBuffer buf, FunctionOperator opQuery query) || no implementation in MySQLAdapter || not started || ---
|-
| public abstract || String appendSubstringPrefixvoid appendSuffixHint(StringBuffer buf, FunctionOperator opQuery query) || at the setup time? || not started || ---
|-
| public abstract || boolean isLiteralvoid appendIndexHint(Primitive typeStringBuffer buf, Object valueQuery query) || testMatch() || not started || ---
|-
| public abstract || void appendLiteralappendTableHint(StringBuffer buf, Primitive typeSQLJoin join, Object valueQuery query)|| no implementation in MySQLAdapter (Look at the Note in the method body)|| not started || ---
|-
| public abstract || void appendTypeConversionappendIdentityPrefix(StringBuffer buf, Object op,Primitive fromType, Primitive type, SQLGenerator genSQLInsert work) || no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void appendPrefixHintboolean appendIdentityValue(StringBuffer buf, Query querySQLInsert work)|| testNew(), testRanges() || not started || ---
|-
| public abstract || void appendInfixHintboolean appendIdentitySuffix(StringBuffer buf, Query querySQLInsert work)|| testNew(), testRanges() || not started || ---
|-
| public abstract || void appendSuffixHintappendInfixHint(StringBuffer buf, Query query)|| no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void appendTableHintbindIdentity(StringBuffer bufPreparedStatement stmt, SQLJoin join, Query querySQLInsert work)throws SQLException|| no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void appendIdentityPrefixObject getIdentityValue(StringBuffer bufPreparedStatement stmt, Column column, SQLInsert work) throws SQLException|| testNew(), testRanges()|| not started || ---
|-
| public abstract || boolean appendIdentityColumnappendNoRowsBlock(StringBuffer buf)|| testNew(), SQLInsert worktestSQLUpdateDenorm() || not started || ---
|-
| public abstract || boolean appendIdentityValuevoid appendNoRowsStart(StringBuffer buf, SQLInsert work)|| no implementation in MySQLAdapter || not started || ---
|-
| public abstract || boolean appendIdentitySuffixvoid appendNoRowsEnd(StringBuffer buf, SQLInsert work)|| no implementation in MySQLAdapter || not started || ---
|-
| public abstract || void bindIdentityboolean isBatchSupported(PreparedStatement stmt)|| testNew(), testRanges(), testInvalidation(), testUpdate(), testSQLUpdateDenorm(), SQLInsert worktestDelete() throws SQLException& All testWorkflows || not started || ---
|-
| public abstract || Object getIdentityValueboolean isBatchUpdateCountSupported()|| same Test Cases as isBatchSupported(PreparedStatement stmt, Column column, SQLInsert work) throws SQLException|| not started || ---
|-
| public abstract || boolean appendNoRowsBlockisBatchable(SQLWork work)|| same Test Cases as isBatchSupported(StringBuffer buf)|| not started || ---
|-
| public protected abstract || void appendNoRowsStartboolean isDateRangeException(StringBuffer bufSQLException e)|| --- || not started || ---
|-
| public protected abstract || boolean isBatchSupportedisDuplicateKeyException(SQLException e)|| testNew()|| not started || ---
|-
| public protected abstract || boolean isBatchUpdateCountSupportedString getDuplicateKeyName(SQLException e)|| testNew()|| not started || ---
|-
| public protected abstract || boolean isBatchableindexNameMatches(Index index, String sPhysicalName)|| testNew(SQLWork work)|| not started || ---
|-
| protected abstract || boolean isDateRangeExceptionisDeadlockException(SQLException e)|| --- || not started || ---
|-
| protected abstract || boolean isQueryTimeoutExceptionisLockTimeoutException(SQLException e)|| --- || not started || ---
|-
| protected public abstract || boolean isDuplicateKeyExceptionString appendStringLengthPrefix(StringBuffer buf, FunctionOperator op) || testRead(SQLException e)|| not started || ---
|-
| protected public abstract || String getDuplicateKeyNameappendSubstringPrefix(StringBuffer buf, FunctionOperator op) || testRead(SQLException e)|| not started || ---
|-
| protected public abstract || boolean indexNameMatchesisLiteral(Index indexPrimitive type, String sPhysicalNameObject value)|| testMatch(), testRead(), testLoad(), testNew(), testDelete(), testSharedLocking() || not started || ---
|-
| protected abstract || boolean isDeadlockExceptionlong getMaxTime(SQLException e)& long getMinTime()|| testUpdate(), testRanges(), testInvalidation() & All testWorkflows || not started || ---
|-
| protected public abstract || boolean isLockTimeoutExceptionSQLSchemaManager createSchemaManager(SQLException e)|| All the tests (Through SQLDataTest)|| not started || ---
|-
| public abstract || SQLSchemaManager createSchemaManagerString 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 || ---
|-
|}
{| class="wikitable sortable" border="1" cellpadding="5"
|+ '''Protected methods to work on'''
! Modifier !! Method Type 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 <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 || boolean isLikeReservedCharvoid appendLikeEscape(char chStringBuffer buf)|| testRead(), testUnicodeCharset() ||where A.first_name like ? escape '\\' /* 1 */ || parse("(and (like? firstName \"J*\") || not started || ---
|-
| protected public || void appendLiteralclose(StringBuffer bufConnection connection)|| All the tests (After commit, String sValuecloses the conncetion)||---|| --- || not started || ---
|-
| protected public || int roundUpListSizeSQLConnection getConnection(int nSize, int nBindCountQuery query)throws SQLException|| All the tests ||---|| --- || not started || ---
|-
| protected public || int roundUpMaxCountString getInitialSQL(int nMaxCount)|| Before any test and during testMatch() (Gets SQL statement to execute when a connection is first established) ||---|| --- || not started || ---
|-
| protected public || boolean indexNameMatchesTable getMatchJoin(String sMetadataNameColumn column, int nMetaStartPair expression) || testMatch() (see the comment for appendMatchStatement() in SQLAdapter) ||---|| --- || not started || ---|-| public || void setFetchSize(PreparedStatement stmt, String sPhysicalNameQuery query) throws SQLException || All the tests EXCEPT testUpgrade(), String sPrefix, boolean bCaseInsensitivetestSQLUpdateDenorm() || ---|| --- || 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