Skip to content

Commit 3926ab6

Browse files
committed
Merge branch 'release/0.4.0-RC'
2 parents 99ead57 + fb0ea74 commit 3926ab6

File tree

14 files changed

+70
-61
lines changed

14 files changed

+70
-61
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ Add `scalikejdbc-async` to your dependencies.
3030

3131
```scala
3232
libraryDependencies ++= Seq(
33-
"org.scalikejdbc" %% "scalikejdbc-async" % "[0.3,)",
34-
"com.github.mauricio" %% "postgresql-async" % "0.2.11",
35-
"com.github.mauricio" %% "mysql-async" % "0.2.11",
36-
"org.slf4j" % "slf4j-simple" % "[1.7,)" // slf4j implementation
33+
"org.scalikejdbc" %% "scalikejdbc-async" % "0.3.+",
34+
"com.github.mauricio" %% "postgresql-async" % "0.2.+",
35+
"com.github.mauricio" %% "mysql-async" % "0.2.+",
36+
"org.slf4j" % "slf4j-simple" % "1.7.+" // slf4j implementation
3737
)
3838
```
3939

4040
If you're a Play2 user, use play-plugin too!
4141

4242
```scala
4343
val appDependencies = Seq(
44-
"org.scalikejdbc" %% "scalikejdbc-async" % "[0.3,)",
45-
"org.scalikejdbc" %% "scalikejdbc-async-play-plugin" % "[0.3,)",
46-
"com.github.mauricio" %% "postgresql-async" % "0.2.11"
44+
"org.scalikejdbc" %% "scalikejdbc-async" % "0.3.+",
45+
"org.scalikejdbc" %% "scalikejdbc-async-play-plugin" % "0.3.+",
46+
"com.github.mauricio" %% "postgresql-async" % "0.2.+"
4747
)
4848
```
4949

@@ -151,7 +151,7 @@ password: sa
151151
Published binary files have the following copyright:
152152

153153
```
154-
Copyright 2013 ScalikeJDBC committers
154+
Copyright 2013 - 2014 scalikejdbc.org
155155
156156
Apache License, Version 2.0
157157

core/src/main/scala/scalikejdbc/async/internal/AsyncResultSetImpl.scala

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,48 +119,48 @@ private[scalikejdbc] class AsyncResultSetImpl(rows: IndexedSeq[RowData])
119119
case dt: DateTime => dt
120120
case TimeInMillis(ms) => new DateTime(ms)
121121
case other => throw new UnsupportedOperationException(
122-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #dateTime!")
122+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaDateTime!")
123123
}
124-
override def dateTime(columnIndex: Int): DateTime = anyToDateTime(any(columnIndex))
125-
override def dateTime(columnLabel: String): DateTime = anyToDateTime(any(columnLabel))
126-
override def dateTimeOpt(columnIndex: Int): Option[DateTime] = Option(dateTime(columnIndex))
127-
override def dateTimeOpt(columnLabel: String): Option[DateTime] = Option(dateTime(columnLabel))
124+
override def jodaDateTime(columnIndex: Int): DateTime = anyToDateTime(any(columnIndex))
125+
override def jodaDateTime(columnLabel: String): DateTime = anyToDateTime(any(columnLabel))
126+
override def jodaDateTimeOpt(columnIndex: Int): Option[DateTime] = Option(jodaDateTime(columnIndex))
127+
override def jodaDateTimeOpt(columnLabel: String): Option[DateTime] = Option(jodaDateTime(columnLabel))
128128

129129
private def anyToLocalDateTime(any: Any): LocalDateTime = any match {
130130
case null => null
131131
case ldt: LocalDateTime => ldt
132132
case TimeInMillis(ms) => new LocalDateTime(ms)
133133
case other => throw new UnsupportedOperationException(
134-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #localDateTime!")
134+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaLocalDateTime!")
135135
}
136-
override def localDateTime(columnIndex: Int): LocalDateTime = anyToLocalDateTime(any(columnIndex))
137-
override def localDateTime(columnLabel: String): LocalDateTime = anyToLocalDateTime(any(columnLabel))
138-
override def localDateTimeOpt(columnIndex: Int): Option[LocalDateTime] = Option(localDateTime(columnIndex))
139-
override def localDateTimeOpt(columnLabel: String): Option[LocalDateTime] = Option(localDateTime(columnLabel))
136+
override def jodaLocalDateTime(columnIndex: Int): LocalDateTime = anyToLocalDateTime(any(columnIndex))
137+
override def jodaLocalDateTime(columnLabel: String): LocalDateTime = anyToLocalDateTime(any(columnLabel))
138+
override def jodaLocalDateTimeOpt(columnIndex: Int): Option[LocalDateTime] = Option(jodaLocalDateTime(columnIndex))
139+
override def jodaLocalDateTimeOpt(columnLabel: String): Option[LocalDateTime] = Option(jodaLocalDateTime(columnLabel))
140140

141141
private def anyToLocalDate(any: Any): LocalDate = any match {
142142
case null => null
143143
case ld: LocalDate => ld
144144
case TimeInMillis(ms) => new LocalDate(ms)
145145
case other => throw new UnsupportedOperationException(
146-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #localDate!")
146+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaLocalDate!")
147147
}
148-
override def localDate(columnIndex: Int): LocalDate = anyToLocalDate(any(columnIndex))
149-
override def localDate(columnLabel: String): LocalDate = anyToLocalDate(any(columnLabel))
150-
override def localDateOpt(columnIndex: Int): Option[LocalDate] = Option(localDate(columnIndex))
151-
override def localDateOpt(columnLabel: String): Option[LocalDate] = Option(localDate(columnLabel))
148+
override def jodaLocalDate(columnIndex: Int): LocalDate = anyToLocalDate(any(columnIndex))
149+
override def jodaLocalDate(columnLabel: String): LocalDate = anyToLocalDate(any(columnLabel))
150+
override def jodaLocalDateOpt(columnIndex: Int): Option[LocalDate] = Option(jodaLocalDate(columnIndex))
151+
override def jodaLocalDateOpt(columnLabel: String): Option[LocalDate] = Option(jodaLocalDate(columnLabel))
152152

153153
private def anyToLocalTime(any: Any): LocalTime = any match {
154154
case null => null
155155
case lt: LocalTime => lt
156156
case TimeInMillis(ms) => new LocalTime(ms)
157157
case other => throw new UnsupportedOperationException(
158-
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #localTime!")
158+
s"Please send a feedback to the library maintainers about supporting ${other.getClass} for #jodaLocalTime!")
159159
}
160-
override def localTime(columnIndex: Int): LocalTime = anyToLocalTime(any(columnIndex))
161-
override def localTime(columnLabel: String): LocalTime = anyToLocalTime(any(columnLabel))
162-
override def localTimeOpt(columnIndex: Int): Option[LocalTime] = Option(localTime(columnIndex))
163-
override def localTimeOpt(columnLabel: String): Option[LocalTime] = Option(localTime(columnLabel))
160+
override def jodaLocalTime(columnIndex: Int): LocalTime = anyToLocalTime(any(columnIndex))
161+
override def jodaLocalTime(columnLabel: String): LocalTime = anyToLocalTime(any(columnLabel))
162+
override def jodaLocalTimeOpt(columnIndex: Int): Option[LocalTime] = Option(jodaLocalTime(columnIndex))
163+
override def jodaLocalTimeOpt(columnLabel: String): Option[LocalTime] = Option(jodaLocalTime(columnLabel))
164164

165165
private def anyToUrl(any: Any): java.net.URL = any match {
166166
case null => null

core/src/test/scala/programmerlist/Company.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ object Company extends SQLSyntaxSupport[Company] with ShortenedNames {
2424
id = rs.long(c.id),
2525
name = rs.string(c.name),
2626
url = rs.stringOpt(c.url),
27-
createdAt = rs.timestamp(c.createdAt).toDateTime,
28-
deletedAt = rs.timestampOpt(c.deletedAt).map(_.toDateTime)
27+
createdAt = rs.jodaDateTime(c.createdAt),
28+
deletedAt = rs.jodaDateTimeOpt(c.deletedAt)
2929
)
3030

3131
lazy val c = Company.syntax("c")

core/src/test/scala/programmerlist/ExampleSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.concurrent._, duration._, ExecutionContext.Implicits.global
66
import org.scalatest._, matchers._
77
import unit._
88

9-
class ExampleSpec extends FlatSpec with ShouldMatchers with DBSettings with Logging {
9+
class ExampleSpec extends FlatSpec with Matchers with DBSettings with Logging {
1010

1111
val p = Programmer.syntax("p")
1212

core/src/test/scala/programmerlist/Skill.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ object Skill extends SQLSyntaxSupport[Skill] with ShortenedNames {
2222
def apply(s: ResultName[Skill])(rs: WrappedResultSet): Skill = new Skill(
2323
id = rs.long(s.id),
2424
name = rs.string(s.name),
25-
createdAt = rs.timestamp(s.createdAt).toDateTime,
26-
deletedAt = rs.timestampOpt(s.deletedAt).map(_.toDateTime)
25+
createdAt = rs.jodaDateTime(s.createdAt),
26+
deletedAt = rs.jodaDateTimeOpt(s.deletedAt)
2727
)
2828

2929
def opt(s: SyntaxProvider[Skill])(rs: WrappedResultSet): Option[Skill] = rs.longOpt(s.resultName.id).map(_ => apply(s.resultName)(rs))

core/src/test/scala/sample/MySQLSampleSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.concurrent._, duration._, ExecutionContext.Implicits.global
66
import scalikejdbc._, SQLInterpolation._, async._
77
import unit._
88

9-
class MySQLSampleSpec extends FlatSpec with ShouldMatchers with DBSettings with Logging {
9+
class MySQLSampleSpec extends FlatSpec with Matchers with DBSettings with Logging {
1010

1111
val column = AsyncLover.column
1212
val createdTime = DateTime.now.withMillisOfSecond(0)

core/src/test/scala/sample/PostgreSQLSampleSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import scala.concurrent._, duration.DurationInt, ExecutionContext.Implicits.glob
77
import scalikejdbc._, SQLInterpolation._, async._
88
import unit._
99

10-
class PostgreSQLSampleSpec extends FlatSpec with ShouldMatchers with DBSettings with Logging {
10+
class PostgreSQLSampleSpec extends FlatSpec with Matchers with DBSettings with Logging {
1111

1212
val column = AsyncLover.column
1313
val createdTime = DateTime.now.withMillisOfSecond(0)

play-sample/app/models/Company.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ object Company extends SQLSyntaxSupport[Company] with ShortenedNames {
2424
id = rs.long(c.id),
2525
name = rs.string(c.name),
2626
url = rs.stringOpt(c.url),
27-
createdAt = rs.timestamp(c.createdAt).toDateTime,
28-
deletedAt = rs.timestampOpt(c.deletedAt).map(_.toDateTime)
27+
createdAt = rs.jodaDateTime(c.createdAt),
28+
deletedAt = rs.jodaDateTimeOpt(c.deletedAt)
2929
)
3030

3131
lazy val c = Company.syntax("c")

play-sample/app/models/Programmer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ object Programmer extends SQLSyntaxSupport[Programmer] with ShortenedNames {
4242
id = rs.long(p.id),
4343
name = rs.string(p.name),
4444
companyId = rs.longOpt(p.companyId),
45-
createdAt = rs.timestamp(p.createdAt).toDateTime,
46-
deletedAt = rs.timestampOpt(p.deletedAt).map(_.toDateTime)
45+
createdAt = rs.jodaDateTime(p.createdAt),
46+
deletedAt = rs.jodaDateTimeOpt(p.deletedAt)
4747
)
4848

4949
// join query with company table

play-sample/app/models/Skill.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ object Skill extends SQLSyntaxSupport[Skill] with ShortenedNames {
2222
def apply(s: ResultName[Skill])(rs: WrappedResultSet): Skill = new Skill(
2323
id = rs.long(s.id),
2424
name = rs.string(s.name),
25-
createdAt = rs.timestamp(s.createdAt).toDateTime,
26-
deletedAt = rs.timestampOpt(s.deletedAt).map(_.toDateTime)
25+
createdAt = rs.jodaDateTime(s.createdAt),
26+
deletedAt = rs.jodaDateTimeOpt(s.deletedAt)
2727
)
2828

2929
def opt(s: SyntaxProvider[Skill])(rs: WrappedResultSet): Option[Skill] = rs.longOpt(s.resultName.id).map(_ => apply(s.resultName)(rs))

0 commit comments

Comments
 (0)