Open main menu

CDOT Wiki β

Changes

PostgreSQL Adapter Project - Code Review 2 Changes

6,598 bytes added, 16:30, 7 July 2011
Created page with '== General == * Run server with connections file that has no port === Research === {| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:c…'
== General ==
* Run server with connections file that has no port

=== Research ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! 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
* Remove changeset that overwrites changes that came from NexJ repository


=== PostgreSQLAdapter ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Task
! Status
! UnitTest
|-
|shared Logic with PostgreSQLSchemaManager
* move logic to PostgreSQLSchemaManager
* on instantiation create reference to PostgreSQLSchemaManager
* reference schema manager for shared logic
|
|
|-
|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
|
|
|-
|BINB_BLOB
* move check for PGXAConnection to first step and let super handle
|
|
|-
|s_bindFactoryArray
* check static initialization to first copy array and then overwrite with custom binds
|
|
|-
|appendMatchExpression
* MUTT just do append OR, look at matchOperatorTest for how to extract arguments from Pair object
|
|
|-
|appendSuffixHint
* change logic to use one buffer
|
|
|-
|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
|
|
|-
|makeViewDummy
* Rename Method name
* Add comment to dummy view with original statement
|
|
|-
|caseInsensitive
* change from LOWER to UPPER
|
|
|-
|indexNameMatches
* check if toDatabaseCase is required
|
|
|-
|executeQuery
* if cannot get QueryExecutor instead synchronize on connection
|
|
|-
|BIND_BLOB
* track down why connection used for unittests has autoCommit enabled
|
|
|}


=== PostgreSQLSchemaManager ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Task
! Status
! UnitTest
|-
|column iterator
* instead use table.columnCount
|
|
|-
|Comparing Primitive
* no need to use getOrdinal
|
|
|-
|isLOB
* use max_field_size for both
|
|
|-
|getOwner
* update all code that requires owner, since default owner now exists
|
|
|-
|getDependentViews
* check for similarities with original implementation
|
|
|-
|appendColumnType
* Primitive.String use isCLOB, remove check from nPrecision
|
|
|-
|renameTable / renameColumn
* recreate the tiggers/procedures instead of dropping and recreating the helper column
|
|
|-
|appendColumnAlteration
* ensure BLOB data is not being lost
|
|
|-
|appendIndexSuffix
* remove indexfill limits check
* change to first add tablespace then index fill
* for index fill less than 10, set to 10
|
|
|-
|isValidColumnName
* use && instead
|
|
|-
|toMetaDatacase
* check if value returned by super implementation works
|
|
|-
|toMetaDatacase / isCaseInsensitiveColumn
* Move logic to strip enclosing quotes from returned values in to metaDatacase
|
|
|-
|getCaseSensitiveName
* check if it is needed if code is implemented that strips off quotations from metadata
|
|
|-
|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
|
|
|-
|alterColumn
* When BLOB column is created, create triggers for lo_manage
* After case when columns do not match, return
|
|
|-
|dropFulltextProcedure
* remove string concatenation
|
|
|-
|createFulltextProcedure / dropFulltextProcedure
* make inline
|
|
|-
|dropTable
* move drop procedure before super call
* rename unneeded buf.setLength
|
|
|-
|dummyviews
* use comment to store old select statement
|
|
|-
|getTableName
* implement where returns quoted tableName without schema
|
|
|-
|renameTable
* merge dropFulltextTrigger and Procedure
|
|
|-
|getIndexName
* use index.getName(Table)
|
|
|-
|appendTSIncrement
* quarter use interval'3 months'
|
|
|}


=== CaseInsensitiveSQLSchemaManager ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Task
! Status
! UnitTest
|-
|appendSeparator / getAlterColumnToken
* remove appendSeparator
* add a flag (bSep) where to add separator or not
|
|
|}


=== PostgreSQLAdapterTest===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Task
! Status
! UnitTest
|-
|isComptatibleVersion
* just return true
|
|
|-
|getUnicodeCheckGuard
* use simpler logic
|
|
|}


=== sql.AllTests===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Task
! Status
! UnitTest
|-
|default.config
* enable both MySQL and PostgreSQL
|
|
|}


=== SQLSchemaManager ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! 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 ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Task
! Status
! UnitTest
|-
|create wrapper for preparestatement
* implement timer logic in wrapper object
|
|
|}


=== JBossInstaller ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! Task
! Status
! UnitTest
|-
|installLoginConfig
* use sqlAdapter.appendLiteral
|
|
|}


== Scripts ==
* Remove empty script files

=== postgresql_setup.sql ===
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
|-
! 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
|
|
|}
1
edit