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

From CDOT Wiki
Jump to: navigation, search
Line 29: Line 29:
 
|  
 
|  
 
|}
 
|}
 +
  
 
=Classes=
 
=Classes=
 
==PostgreSQLAdapter==
 
==PostgreSQLAdapter==
* Implement setQueryTime with Timer object
+
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;"
** if code variation is limited, extract to SQLAdapter
+
|-
* Refactor escaping literals
+
! Task
** May be make use isLiteral
+
! Status
*appendMatchExpression
+
! UnitTest
** Add parentheses to enforce operation order
+
|-
** Remove implementation of MatchNode.WEIGHT.SYMBOL
+
|Implement setQueryTime with Timer object
* indexNameMatches
+
* if code variation is limited, extract to SQLAdapter
** Use toMetadataCase and toDatabaseCase instead of toLowerCase/toUpperCase
+
|
* appendSuffixHint
+
|
** Implement query locking for aggregate queries (i.e. repeatable read + exclusive lock)
+
|-
* appendLiteral
+
| Refactor escaping literals
** Check if timestamp'' accepts java.sql.timestamp.toString() format
+
* May be make use isLiteral
** If boolean constants are supported, use those instead of string 't'/'f'
+
|
* getBind
+
|
** Check if override is necessary
+
|-
* isLiteral
+
|appendMatchExpression
** Use string.length and binary.getSize to ensure less than 1GB
+
* Add parentheses to enforce operation order
* appendTypeConversion
+
* Remove implementation of MatchNode.WEIGHT.SYMBOL
** Ensure to_timestamp accepts milliseconds
+
|
** Ensure case Primitive.TIMESTAMP_ORDINAL: returns milliseconds (extract(epoch from
+
|
* isUnicode
+
|-
** Check if column is set to use UTF-16 encoding
+
|indexNameMatches
** TRUE == is a unicode column FALSE == is not a unicode column null == unknown (e.g. number column or column not present)
+
* Use toMetadataCase and toDatabaseCase instead of toLowerCase/toUpperCase
* s_bindFactoryArray[Primitive.BINARY_ORDINAL]
+
|
** Use reflection to make use of postgresql jdbc objects and methods to handle large objects
+
|
* DUPLICATE_KEY_NAME_PATTERN
+
|-
** Remove
+
|appendSuffixHint
 +
* Implement query locking for aggregate queries (i.e. repeatable read + exclusive lock)
 +
|
 +
|
 +
|-
 +
| appendLiteral
 +
* Check if timestamp'' accepts java.sql.timestamp.toString() format
 +
* If boolean constants are supported, use those instead of string 't'/'f'
 +
|
 +
|
 +
|-
 +
| getBind
 +
* Check if override is necessary
 +
|
 +
|
 +
|-
 +
| isLiteral
 +
* Use string.length and binary.getSize to ensure less than 1GB
 +
|
 +
|
 +
|-
 +
| appendTypeConversion
 +
* Ensure to_timestamp accepts milliseconds
 +
* Ensure case Primitive.TIMESTAMP_ORDINAL: returns milliseconds (extract(epoch from
 +
|
 +
|
 +
|-
 +
| isUnicode
 +
* Check if column is set to use UTF-16 encoding
 +
* TRUE == is a unicode column FALSE == is not a unicode column null == unknown (e.g. number column or column not present)
 +
|
 +
|
 +
|-
 +
| s_bindFactoryArray[Primitive.BINARY_ORDINAL]
 +
* Use reflection to make use of postgresql jdbc objects and methods to handle large objects
 +
|
 +
|
 +
|-
 +
| DUPLICATE_KEY_NAME_PATTERN
 +
* Modify pattern to remove dependency on english words
 +
|
 +
|
 +
|-
 +
|s_bindFactoryArray
 +
* Use parent BINDS for unchanged binds
 +
|
 +
|
 +
|}
 
==PostgreSQLSchemaManager==
 
==PostgreSQLSchemaManager==
  

Revision as of 12:22, 20 April 2011

General Research

Task Status
Can postgreSQL be configured to have the where clause use case insensitive compare for string values? i.e. (select 'Grace' = 'grace' => should return true)
Add UUID generation to x64 versions
Does extract(epoch from value) return milliseconds?
What encoding (UTF-8 and/or UTF-16) does PostgreSQL use for unicode? Can this be configured per column?
How is a repeatable read with exclusive lock implemented?
Does timestamp'value', handle java.sql.timestamp.toString()?
Does to_timestamp support milliseconds?
Does postgreSQL have constants for boolean values?


Classes

PostgreSQLAdapter

Task Status UnitTest
Implement setQueryTime with Timer object
  • if code variation is limited, extract to SQLAdapter
Refactor escaping literals
  • May be make use isLiteral
appendMatchExpression
  • Add parentheses to enforce operation order
  • Remove implementation of MatchNode.WEIGHT.SYMBOL
indexNameMatches
  • Use toMetadataCase and toDatabaseCase instead of toLowerCase/toUpperCase
appendSuffixHint
  • Implement query locking for aggregate queries (i.e. repeatable read + exclusive lock)
appendLiteral
  • Check if timestamp accepts java.sql.timestamp.toString() format
  • If boolean constants are supported, use those instead of string 't'/'f'
getBind
  • Check if override is necessary
isLiteral
  • Use string.length and binary.getSize to ensure less than 1GB
appendTypeConversion
  • Ensure to_timestamp accepts milliseconds
  • Ensure case Primitive.TIMESTAMP_ORDINAL: returns milliseconds (extract(epoch from
isUnicode
  • Check if column is set to use UTF-16 encoding
  • TRUE == is a unicode column FALSE == is not a unicode column null == unknown (e.g. number column or column not present)
s_bindFactoryArray[Primitive.BINARY_ORDINAL]
  • Use reflection to make use of postgresql jdbc objects and methods to handle large objects
DUPLICATE_KEY_NAME_PATTERN
  • Modify pattern to remove dependency on english words
s_bindFactoryArray
  • Use parent BINDS for unchanged binds

PostgreSQLSchemaManager

Scripts

postgrecreate.sql

postgresetup.sql

postgredrop.sql