Skip to content

Commit

Permalink
Merge pull request #641 of vgrigoriu/OracleTimeZone
Browse files Browse the repository at this point in the history
  Add DateTimeOffset to Oracle type map
  • Loading branch information
tommarien committed Oct 20, 2015
2 parents b26b7f6 + fd2bb86 commit 13bfdcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protected override void SetupTypeMaps()
SetTypeMap(DbType.Currency, "NUMBER(19,1)");
SetTypeMap(DbType.Date, "DATE");
SetTypeMap(DbType.DateTime, "TIMESTAMP(4)");
SetTypeMap(DbType.DateTimeOffset, "TIMESTAMP(4) WITH TIME ZONE");
SetTypeMap(DbType.Decimal, "NUMBER(19,5)");
SetTypeMap(DbType.Decimal, "NUMBER($size,$precision)", DecimalCapacity);
SetTypeMap(DbType.Double, "DOUBLE PRECISION");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ public void DateTimeIsTimestamp()
_typeMap.GetTypeMap(DbType.DateTime, 0, 0).ShouldBe("TIMESTAMP(4)");
}

[Test]
public void DateTimeOffsetIsTimestampWithTimeZone()
{
_typeMap.GetTypeMap(DbType.DateTimeOffset, 0, 0).ShouldBe("TIMESTAMP(4) WITH TIME ZONE");
}

[Test]
public void DecimalDefaultIsNumber()
{
Expand Down

0 comments on commit 13bfdcd

Please sign in to comment.