>From 85de709a47474634524c3492a9927a53065b1eae Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 8 Apr 2011 10:35:13 +0200 Subject: [PATCH 4/4] dbd-postgres: Do not attempt to the NULL value If the value of a column is NULL the closest Smalltalk type is nil. Do not attempt to create any instance from a NULL. --- packages/dbd-postgresql/ChangeLog | 4 ++++ packages/dbd-postgresql/ColumnInfo.st | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/packages/dbd-postgresql/ChangeLog b/packages/dbd-postgresql/ChangeLog index 0ca6d3b..295b594 100644 --- a/packages/dbd-postgresql/ChangeLog +++ b/packages/dbd-postgresql/ChangeLog @@ -1,3 +1,7 @@ +2011-04-07 Holger Hans Peter Freyther + + * ColumnInfo.st: Do not attempt to convert a NULL value. + 2011-04-08 Holger Hans Peter Freyther * Statements.st: Implement executeWithAll: diff --git a/packages/dbd-postgresql/ColumnInfo.st b/packages/dbd-postgresql/ColumnInfo.st index 436ccbd..74c5343 100644 --- a/packages/dbd-postgresql/ColumnInfo.st +++ b/packages/dbd-postgresql/ColumnInfo.st @@ -213,7 +213,8 @@ ColumnInfo subclass: PGColumnInfo [ PGColumnInfo class >> convert: aRaw type: aType [ - TypeConversions at: aType ifPresent: [:sel | ^self perform: sel with: aRaw]. + aRaw isNil ifFalse: [ + TypeConversions at: aType ifPresent: [:sel | ^self perform: sel with: aRaw]]. ^aRaw ] -- 1.7.4