Skip to content

Commit

Permalink
zio#656 alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahotoole committed May 26, 2022
1 parent 628c9f3 commit 5fc7463
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mysql/src/main/scala/zio/sql/mysql/MysqlSqlModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ trait MysqlSqlModule extends Sql { self =>
val Degrees = FunctionDef[Double, Double](FunctionName("degrees"))
val Log2 = FunctionDef[Double, Double](FunctionName("log2"))
val Log10 = FunctionDef[Double, Double](FunctionName("log10"))
val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi")))
val MakeTime = FunctionDef[(Int, Int, Double), LocalTime](FunctionName("maketime"))
val Pi = Expr.FunctionCall0[Double](FunctionDef[Any, Double](FunctionName("pi")))
}

}
12 changes: 6 additions & 6 deletions mysql/src/test/scala/zio/sql/mysql/FunctionDefSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema {

assertion.mapErrorCause(cause => Cause.stackless(cause.untraced))
},
test("pi") {
val query = select(Pi) from customers
test("maketime") {
val query = select(MakeTime(12, 15, 30.5)) from customers

val expected = 3.141593d
val expected = LocalTime.parse("12:15:30.5")

val testResult = execute(query)

Expand All @@ -160,10 +160,10 @@ object FunctionDefSpec extends MysqlRunnableSpec with ShopSchema {

assertion.mapErrorCause(cause => Cause.stackless(cause.untraced))
},
test("maketime") {
val query = select(MakeTime(12, 15, 30.5)) from customers
test("pi") {
val query = select(Pi) from customers

val expected = LocalTime.parse("12:15:30.5")
val expected = 3.141593d

val testResult = execute(query)

Expand Down

0 comments on commit 5fc7463

Please sign in to comment.