Difference between revisions of "PostgreSQL Adapter Project - Code Review 4 Changes"
(→PostgreSQLAdapter) |
|||
Line 106: | Line 106: | ||
*If an error occurs, lo will not be closed. Please fix this. | *If an error occurs, lo will not be closed. Please fix this. | ||
* setAutoCommit - why is this modified at all? We cannot simply change the autocommit flag on a connection. | * setAutoCommit - why is this modified at all? We cannot simply change the autocommit flag on a connection. | ||
− | | | + | |''DONE''' |
+ | *Remove BIND_BLOB | ||
|- | |- | ||
|BIND_STRING, BIND_BINARY | |BIND_STRING, BIND_BINARY | ||
Line 125: | Line 126: | ||
*Are we using the correct data source class? | *Are we using the correct data source class? | ||
| | | | ||
− | - PGXADataSource | + | - PGXADataSource is the one that gives pooled connections<br/> |
- When using data load/schema tool<br/> | - When using data load/schema tool<br/> | ||
- Yes, PGXADataSource is the correct data source class | - Yes, PGXADataSource is the correct data source class | ||
Line 132: | Line 133: | ||
*what is the purpose of the conditional logic involving these? | *what is the purpose of the conditional logic involving these? | ||
| | | | ||
+ | -s_PGXAConnection used to ensure that reflected methods and properties loaded successfully<br/> | ||
+ | -s_getQueryExecutor used to ensure that unwrapped connection is a PGConnection | ||
|- | |- | ||
|appendIdentitySuffix | |appendIdentitySuffix | ||
*Add a space after ";" for readability | *Add a space after ";" for readability | ||
− | | | + | |'''DONE''' |
|- | |- | ||
|appendLiteral | |appendLiteral | ||
*TIMESTAMP_ORDINAL - this should be in UTC, I think that simply converting the timestamp to a string might not do it. | *TIMESTAMP_ORDINAL - this should be in UTC, I think that simply converting the timestamp to a string might not do it. | ||
*Try to see if using Primitive.toString() will provide the right format. | *Try to see if using Primitive.toString() will provide the right format. | ||
− | | | + | |'''DONE''' |
+ | *used StringUtil.appendUTC | ||
|- | |- | ||
|appendTypeConversion | |appendTypeConversion | ||
*TIMESTAMP_ORDINAL - please verify that this actually formats/parses UTC timestamps. | *TIMESTAMP_ORDINAL - please verify that this actually formats/parses UTC timestamps. | ||
− | | | + | |'''DONE''' |
+ | *modified postgresql setup scripts to set timezone to UTC | ||
+ | *changed to use date_part('epoch', timestamp) | ||
|- | |- | ||
|indexNameMatches | |indexNameMatches | ||
*Spaces around commas are needed. Wrap the line after about 110 chars. | *Spaces around commas are needed. Wrap the line after about 110 chars. | ||
− | | | + | |'''DONE''' |
|- | |- | ||
− | |isUnicode | + | |isUnicode |
*Use lower case SQL keywords | *Use lower case SQL keywords | ||
*Use bind variables - this is what makes prepared statements cacheable by the DB | *Use bind variables - this is what makes prepared statements cacheable by the DB | ||
Line 156: | Line 162: | ||
*catch(SQLException e) space before ( | *catch(SQLException e) space before ( | ||
*Do not repackage the SQLException as a runtime exception - the method already allows throwing an SQLException | *Do not repackage the SQLException as a runtime exception - the method already allows throwing an SQLException | ||
− | | | + | |'''DONE''' |
|} | |} | ||
Revision as of 22:42, 14 September 2011
Contents
General
Task | Status |
---|---|
{
} undo the change to ; |
Classes
Table
Task | Status |
---|---|
getQuotedName
|
DONE |
SQLAdapter
Task | Status |
---|---|
setQueryTimeout()
|
DONE |
CancelTask -> StatementCancelationTask;
|
DONE |
SQLSchemaManager
Task | Status |
---|---|
addColumn
|
DONE |
I think the portable flag should not take into account columns that are not added to the table (return null in this case)? | DONE |
The message about ignoring an index has changed
|
Diff is malfunctioning |
There are extensive changes to readSchema?
|
Diff is malfunctioning |
getAlterColumnToken
|
DONE |
isPortable()
This hampers method reusability.). |
DONE |
isWindowsCompatiable -> isWindowsCompatible | DONE |
StatementProxy/PreparedStatementProxy
Task | Status |
---|---|
*Proxy.java -> *Wrapper.java
|
DONE |
PostgreSQLAdapter
Task | Status |
---|---|
MAX_FIELD_PRECISION - is this from the PostgreSQL documentation?
|
DONE |
BIND_BLOB
You already have this value, no need to get it again later on. Use Primitive.createLong() to create the long value.
|
DONE'
|
BIND_STRING, BIND_BINARY
|
|
RequestTimeout should take into account non-positive timeouts. | values <=0 do not get to requestTimeout |
The timeout management functionality requestTimeout and releaseTimeout(rename to schedule and cancel)
|
DONE |
unwrap
|
- PGXADataSource is the one that gives pooled connections |
s_PGXAConnection, s_getQueryExecutor
|
-s_PGXAConnection used to ensure that reflected methods and properties loaded successfully |
appendIdentitySuffix
|
DONE |
appendLiteral
|
DONE
|
appendTypeConversion
|
DONE
|
indexNameMatches
|
DONE |
isUnicode
|
DONE |
PostgreSQLPreparedStatementProxy
Task | Status |
---|---|
Provide a class comment | |
Prepend a comment "// inner classes" | |
Use visibility declarators on members ("protected") | |
Fold lines after about 110 chars | |
requestSavepoint
|
PostgreSQLSchemaManager
Task | Status |
---|---|
appendColumnAlteration
|
|
appendLOManagerTrigger
|
|
appendTSIncrement
|
|
getGUIDExpr
|
|
isImplicitConversion
|
|
isValidColumnName
|
|
addColumn
|