Skip to content

Commit

Permalink
Fix naming conflicts with PgDateSupportJoda and PgDate2Support classes
Browse files Browse the repository at this point in the history
  • Loading branch information
tminglei committed Oct 20, 2017
1 parent 02eb07b commit c5c720f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ trait PgDateSupportJoda extends date.PgDateExtensions with utils.PgCommonJdbcTyp
fnFromString = (s) => DateTime.parse(s, tzDateTimeFormatter(s)),
fnToString = (v) => v.toString(jodaTzDateTimeFormatter),
hasLiteralForm = false)
implicit val date2InstantTypeMapper: JdbcType[Instant] = new GenericJdbcType[Instant]("timestamptz",
implicit val jodaInstantTypeMapper: JdbcType[Instant] = new GenericJdbcType[Instant]("timestamptz",
fnFromString = (s) => Instant.parse(s, tzDateTimeFormatter(s)),
fnToString = (v) => v.toString(jodaTzDateTimeFormatter),
hasLiteralForm = false)
Expand Down Expand Up @@ -83,9 +83,9 @@ trait PgDateSupportJoda extends date.PgDateExtensions with utils.PgCommonJdbcTyp
implicit def jodaTzTimestampOptColumnExtensionMethods(c: Rep[Option[DateTime]]) =
new TimestampColumnExtensionMethods[LocalDate, LocalTime, DateTime, LocalDateTime, Period, Option[DateTime]](c)

implicit def date2Timestamp1ColumnExtensionMethods(c: Rep[Instant]) =
implicit def jodaTimestamp1ColumnExtensionMethods(c: Rep[Instant]) =
new TimestampColumnExtensionMethods[LocalDate, LocalTime, Instant, LocalDateTime, Period, Instant](c)
implicit def date2Timestamp1OptColumnExtensionMethods(c: Rep[Option[Instant]]) =
implicit def jodaTimestamp1OptColumnExtensionMethods(c: Rep[Option[Instant]]) =
new TimestampColumnExtensionMethods[LocalDate, LocalTime, Instant, LocalDateTime, Period, Option[Instant]](c)
}

Expand All @@ -107,7 +107,7 @@ trait PgDateSupportJoda extends date.PgDateExtensions with utils.PgCommonJdbcTyp
// driver.asInstanceOf[ExPostgresDriver].bindPgTypeToScala("interval", classTag[Period])
}

implicit class PgDate2TimePositionedResult(r: PositionedResult) {
implicit class PgJodaTimePositionedResult(r: PositionedResult) {
def nextLocalDate() = nextLocalDateOption().orNull
def nextLocalDateOption() = r.nextStringOption().map(LocalDate.parse(_, jodaDateFormatter))
def nextLocalTime() = nextLocalTimeOption().orNull
Expand Down

0 comments on commit c5c720f

Please sign in to comment.