Skip to content

Commit

Permalink
style: format codes
Browse files Browse the repository at this point in the history
  • Loading branch information
shouwn committed Mar 13, 2024
1 parent 181aa4b commit ee96b35
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
64 changes: 32 additions & 32 deletions dsl/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/dsl/jpql/Jpql.kt
Original file line number Diff line number Diff line change
Expand Up @@ -646,38 +646,6 @@ open class Jpql : JpqlDsl {
return Expressions.ln(value.toExpression())
}

/**
* Create expression that calculates the powering of a numeric [base] to a specified [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Any, V : Number> power(base: KProperty1<T, @Exact V>, exponent: Number): Expression<Double> {
return Expressions.power(Paths.path(base), Expressions.value(exponent))
}

/**
* Create expression that calculates the powering of a numeric [base] to a specified [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Any, V : Number> power(base: KProperty1<T, @Exact V>, exponent: Expressionable<V>): Expression<Double> {
return Expressions.power(Paths.path(base), exponent.toExpression())
}

/**
* Create expression that calculates the powering of a numeric [base] to a specified [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Number> power(base: Expressionable<T>, exponent: T): Expression<Double> {
return Expressions.power(base.toExpression(), Expressions.value(exponent))
}

/**
* Create expression that calculates the powering of a numeric [base] to a specified [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Number> power(base: Expressionable<T>, exponent: Expressionable<T>): Expression<Double> {
return Expressions.power(base.toExpression(), exponent.toExpression())
}

/**
* Creates an expression that represents the sign of value.
*
Expand Down Expand Up @@ -782,6 +750,38 @@ open class Jpql : JpqlDsl {
return Expressions.mod(value1.toExpression(), value2.toExpression())
}

/**
* Create an expression that represents the power of [base] and [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Any, V : Number> power(base: KProperty1<T, @Exact V>, exponent: Number): Expression<Double> {
return Expressions.power(Paths.path(base), Expressions.value(exponent))
}

/**
* Create an expression that represents the power of [base] and [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Number> power(base: Expressionable<T>, exponent: T): Expression<Double> {
return Expressions.power(base.toExpression(), Expressions.value(exponent))
}

/**
* Create an expression that represents the power of [base] and [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Any, V : Number> power(base: KProperty1<T, @Exact V>, exponent: Expressionable<V>): Expression<Double> {
return Expressions.power(Paths.path(base), exponent.toExpression())
}

/**
* Create an expression that represents the power of [base] and [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Number> power(base: Expressionable<T>, exponent: Expressionable<T>): Expression<Double> {
return Expressions.power(base.toExpression(), exponent.toExpression())
}

/**
* Creates an expression that the number of elements of the collection.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ object Expressions {
}

/**
* Creates expression that calculates the powering of a numeric [base] to a specified [exponent].
* Create an expression that represents the power of [base] and [exponent].
*/
@SinceJdsl("3.4.0")
fun <T : Number> power(base: Expression<T>, exponent: Expression<T>): Expression<Double> {
Expand Down

0 comments on commit ee96b35

Please sign in to comment.