Difference between revisions of "PostgreSQL Adapter Project - Code Review 2 Changes"

From CDOT Wiki
Jump to: navigation, search
(CaseInsensitiveSQLSchemaManager)
(PostgreSQLAdapterTest)
Line 274: Line 274:
 
|isComptatibleVersion
 
|isComptatibleVersion
 
* just return true
 
* just return true
|
+
|'''DONE'''
 
|
 
|
 
|-
 
|-
 
|getUnicodeCheckGuard
 
|getUnicodeCheckGuard
 
* use simpler logic
 
* use simpler logic
|
+
|'''DONE'''
 
|
 
|
 
|}
 
|}
 
  
 
=== sql.AllTests===
 
=== sql.AllTests===

Revision as of 13:49, 18 July 2011

General

  • Run server with connections file that has no port

Research

Task Outcome
Why does DB add quotes to column names that where not original quoted e.g. if a column name contains $ ?
Check meta data that jdbc driver returns if column names are quoted e.g. name, value, cache
Check what happens if table with column sizes that exceeds page size for a row. If there is limit, then move virtual columns to tables instead
Are postgresql functions atomic?
Check if size of column storage for characters can be specified
What is the maximum return value for full-text search?


Classes

Fix repository (DONE - Recreated the repository)

  • Remove changeset that overwrites changes that came from NexJ repository


PostgreSQLAdapter

Task Status UnitTest
shared Logic with PostgreSQLSchemaManager
  • move logic to PostgreSQLSchemaManager
  • on instantiation create reference to PostgreSQLSchemaManager
  • reference schema manager for shared logic
DONE
variables for reflection
  • change names to full method/variable name
  • remove integer declaration for write modes
  • get methods from interfaces and not implementations
  • remove unnecessary class declarations
DONE
BINB_BLOB
  • move check for PGXAConnection to first step and let super handle
DONE
s_bindFactoryArray
  • change static initialization to first copy array and then overwrite with custom binds
DONE
appendMatchExpression
  • MUTT just do append OR, look at matchOperatorTest for how to extract arguments from Pair object
appendSuffixHint
  • change logic to use one buffer
DONE
appendTypeConversion
  • check bool <-> string
  • check for new log for if(op instead d) in MySQLAdapter
isUnicode
  • remove table alias from query
  • modify logic to check column type and if character then check unicode
DONE
caseInsensitive
  • change from LOWER to UPPER
DONE
indexNameMatches
  • check if toDatabaseCase is required
DONE
executeQuery
  • if cannot get QueryExecutor instead synchronize on connection
DONE
BIND_BLOB
  • track down why connection used for unittests has autoCommit enabled
DONE
unwrap
  • Override unwrap and move logic in getPostgreSQLConnection to this method
DONE

PostgreSQLSchemaManager

Task Status UnitTest
table.getColumnIterator()
  • instead use table.getColumnCount()
DONE
Comparing Primitive
  • no need to use getOrdinal
DONE
isLOB
  • use max_field_size for both
DONE'
getOwner
  • update all code that requires owner, since default owner now exists
DONE
getDependentViews
  • check for similarities with original implementation
DONE no similarities
appendColumnType
  • Primitive.String use isLOB, remove check from nPrecision
DONE
renameTable / renameColumn
  • recreate the tiggers/procedures instead of dropping and recreating the helper column
DONE **
appendColumnAlteration
  • ensure BLOB data is not being lost
DONE
appendIndexSuffix
  • remove indexfill limits check
  • change to first add tablespace then index fill
  • for index fill less than 10, set to 10
DONE
isValidColumnName
  • use && instead
DONE
toMetaDatacase
  • check if value returned by super implementation works
DONE
toMetaDatacase / isCaseInsensitiveColumn
  • Move logic to strip enclosing quotes from returned values in to metaDatacase
DONE
getCaseSensitiveName
  • check if it is needed if code is implemented that strips off quotations from metadata
DONE
isImplicitConversion
  • start off by returning true, run unit test and for those that fail, return false
unlinkLargeObjects
  • change to 2 implementations that take a table and a column
DONE
alterColumn
  • When BLOB column is created, create triggers for lo_manage
  • After case when columns do not match, return
DONE
dropFulltextProcedure
  • remove string concatenation
DONE
createFulltextProcedure / dropFulltextProcedure
  • make inline
DONE
dropTable
  • move drop procedure before super call
  • rename unneeded buf.setLength
DONE
dummyviews
  • use comment to store old select statement
DONE
getTableName
  • implement where returns quoted tableName without schema
DONE
renameTable
  • merge dropFulltextTrigger and Procedure
DONE
getIndexName
  • use index.getName(Table)
DONE
appendTSIncrement
  • quarter use interval'3 months'
DONE
makeViewDummy
  • Rename Method name
  • Add comment to dummy view with original statement
DONE

CaseInsensitiveSQLSchemaManager

Task Status UnitTest
appendSeparator / getAlterColumnToken
  • remove appendSeparator
  • add a flag (bSep) where to add separator or not
DONE

PostgreSQLAdapterTest

Task Status UnitTest
isComptatibleVersion
  • just return true
DONE
getUnicodeCheckGuard
  • use simpler logic
DONE

sql.AllTests

Task Status UnitTest
default.config
  • enable both MySQL and PostgreSQL


SQLSchemaManager

Task Status UnitTest
isWindowsCompatiable
  • just pass in property file
  • change logic to not use loop
setMetadataDatabaseProperties
  • move statement for owner property to place in alphabetical order


SQLCursor

Task Status UnitTest
create wrapper for preparestatement
  • implement timer logic in wrapper object


JBossInstaller

Task Status UnitTest
installLoginConfig
  • use sqlAdapter.appendLiteral

Scripts

  • Remove empty script files

postgresql_setup.sql

Task Status UnitTest
encoding and collation
  • get values from custom properties
add comment that locktimeout exception is not support on postgresql
add procedure to check that all contrib modules have been installed
set default owner to nexj