-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
225 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
common/src/main/scala/dataprism/platform/sql/value/SqlHyperbolicTrigFunctions.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package dataprism.platform.sql.value | ||
|
||
import dataprism.sharedast.SqlExpr | ||
|
||
trait SqlHyperbolicTrigFunctions extends SqlDbValuesBase { | ||
|
||
type DbMath <: SqlHyperbolicTrigMath | ||
|
||
trait ASinhCapability | ||
trait ACoshCapability | ||
trait ATanhCapability | ||
|
||
trait SqlHyperbolicTrigMath: | ||
def acosh(v: DbValue[Double])(using ACoshCapability): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.ACosh, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
|
||
def asinh(v: DbValue[Double])(using ASinhCapability): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.ASinh, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
|
||
def atanh(v: DbValue[Double])(using ATanhCapability): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.ATanh, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
|
||
def cosh(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.Cosh, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
|
||
def sinh(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.Sinh, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
|
||
def tanh(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.Tanh, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
} |
25 changes: 25 additions & 0 deletions
25
common/src/main/scala/dataprism/platform/sql/value/SqlTrigFunctions.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package dataprism.platform.sql.value | ||
|
||
import dataprism.sharedast.SqlExpr | ||
|
||
trait SqlTrigFunctions extends SqlDbValuesBase { | ||
|
||
type DbMath <: SqlTrigMath | ||
trait SqlTrigMath: | ||
def acos(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.ACos, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
def asin(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.ASin, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
def atan(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.ATan, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
def atan2(v1: DbValue[Double], v2: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.ATan2, Seq(v1.unsafeAsAnyDbVal, v2.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
def cos(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.Cos, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
def cot(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.Cot, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
def sin(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.Sin, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
def tan(v: DbValue[Double]): DbValue[Double] = | ||
Impl.function(SqlExpr.FunctionName.Tan, Seq(v.unsafeAsAnyDbVal), AnsiTypes.doublePrecision) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.