nbcp.myoql.db.sql.base.SqlOrderBy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktmyoql Show documentation
Show all versions of ktmyoql Show documentation
kotlin orm -- mysql,mongo , just like ktorm
The newest version!
package nbcp.myoql.db.sql.base
import java.io.Serializable
data class SqlOrderBy(var orderBy: SqlParameterData, var Asc: Boolean) : Serializable {
fun toSingleSqlData(): SqlParameterData {
if (orderBy.expression.isEmpty()) {
return SqlParameterData()
}
return SqlParameterData(" ${this.orderBy.expression} ${if (this.Asc) "asc" else "desc"}", this.orderBy.values)
}
}