easysql.dsl
package easysql.dsl
Members list
Type members
Classlikes
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
object AllColumn
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AllColumn.type
case class AllColumnExpr(owner: Option[String]) extends Expr[Nothing]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[Nothing]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class JoinTableclass TableSchema[E]
case class BetweenExpr(expr: Expr[_], start: Expr[_], end: Expr[_], not: Boolean) extends Expr[Boolean]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[Boolean]class Objecttrait Matchableclass AnyShow all
case class BinaryExpr[T <: SqlDataType](left: Expr[_], op: SqlBinaryOperator, right: Expr[_]) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
case class CaseExpr[T <: SqlDataType](branches: List[CaseBranch[_]], default: Expr[_]) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
case class CastExpr[T <: SqlDataType](expr: Expr[_], castType: String) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
case class Column(columnName: String) extends StaticAnnotation
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
case class ColumnExpr[T <: SqlDataType, N <: String](tableName: String, columnName: String, identName: N) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
case class CustomColumn[T, D <: SqlDataType](columnName: String, serializer: CustomSerializer[T, D]) extends StaticAnnotation
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
case class DynamicExpr[T <: SqlDataType](expr: SqlExpr) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class AggExpr[T]class AllColumnExprclass BetweenExprclass BinaryExpr[T]class CaseExpr[T]class CastExpr[T]class DynamicExpr[T]class FuncExpr[T]class InExprclass ListExpr[T]class LiteralExpr[T]object NullExpr.typeclass OverExpr[T]class SubQueryExpr[T]Show all
object Expr
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object boolOperator.typeobject dateOperator.typeobject stringOperator.typeobject unsafeOperator.type
case class FuncExpr[T <: SqlDataType](name: String, args: List[Expr[_]]) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[Boolean]class Objecttrait Matchableclass AnyShow all
case class IncrKey(columnName: String) extends StaticAnnotation
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
class JPA[E <: Product](val table: TableSchema[E]) extends Dynamic
Attributes
- Companion
- object
- Supertypes
-
trait Dynamicclass Objecttrait Matchableclass Any
object JPA
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AnyTableclass Objecttrait Matchableclass AnyShow all
case class ListExpr[T <: SqlDataType](list: List[Expr[_]]) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
case class LiteralExpr[T <: SqlDataType](value: T) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
case class OverExpr[T <: SqlDataType](func: AggExpr[T], partitionBy: List[Expr[_]], orderBy: List[OrderBy], between: Option[SqlOverBetween]) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
case class PrimaryKey(columnName: String) extends StaticAnnotation
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
case class PrimaryKeyExpr[T <: SqlDataType, N <: String](tableName: String, columnName: String, identName: N, inc: Boolean) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
case class PrimaryKeyGenerator(columnName: String, generator: () => SqlDataType) extends StaticAnnotation
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
case class SubQueryExpr[T <: SqlDataType](query: Query[(T), _]) extends Expr[T]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Expr[T]class Objecttrait Matchableclass AnyShow all
case class Table(tableName: String) extends StaticAnnotation
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
class TableSchema[E <: Product](`__tableName`: String, `__aliasName`: Option[String], `__cols`: List[ColumnExpr[_, _]]) extends AnyTable, Selectable
Attributes
- Supertypes
object unsafeOperator extends ExprOperator[_]
Attributes
- Supertypes
- Self type
-
unsafeOperator.type
Types
type AliasNames[T <: Tuple] = HasAliasName[T] match { case true => ExtractAliasNames[T] case false => EmptyTuple }
type ElementType[T <: Tuple, N <: Tuple, Name <: String] = (T, N) match { case (t *: tt, n *: nt) => n == Name match { case true => t match { case SqlDataType => t case Option[o] => o match { case SqlDataType => o } case Any => Nothing } case false => ElementType[tt, nt, Name] } case (EmptyTuple, EmptyTuple) => Nothing }
type ExtractAliasNames[T <: Tuple] = T match { case AliasExpr[_$5, n] *: t => n *: ExtractAliasNames[t] case ColumnExpr[_$6, n] *: t => n *: ExtractAliasNames[t] case PrimaryKeyExpr[_$7, n] *: t => n *: ExtractAliasNames[t] case Any => EmptyTuple }
type FindTypeByName[T <: Tuple, I <: Int, Name <: String] = I >= 0 match { case true => Elem[T, I] match { case (t, n) => n == Name match { case true => t case false => FindTypeByName[T, I - 1, Name] } case Any => Nothing } case false => Nothing }
type HasAliasName[T <: Tuple] = T match { case AliasExpr[_$2, n] *: t => true && HasAliasName[t] case ColumnExpr[_$3, n] *: t => true && HasAliasName[t] case PrimaryKeyExpr[_$4, n] *: t => true && HasAliasName[t] case EmptyTuple => true case Any => false }
type InsertType[T <: Tuple] = T match { case h *: t => h | Option[h] *: InsertType[t] case EmptyTuple => EmptyTuple }
type InverseMap[X <: Tuple] = X match { case Expr[x] *: t => x *: InverseMap[t] case AliasExpr[x, _$1] *: t => x *: InverseMap[t] case TableSchema[x] *: t => x *: InverseMap[t] case EmptyTuple => EmptyTuple }
type JPAArgsType[ElementTypes <: Tuple, ElementLabels <: Tuple, NS <: Tuple] = NS match { case h *: t => h match { case "by" | "and" | "or" => t match { case name *: tt => tt match { case "in" | "notIn" *: ttt => List[ElementType[ElementTypes, ElementLabels, name]] *: JPAArgsType[ElementTypes, ElementLabels, ttt] case "like" | "notLike" | "startingWith" | "endingWith" *: ttt => String *: JPAArgsType[ElementTypes, ElementLabels, ttt] case "gt" | "ge" | "lt" | "le" | "not" *: ttt => ElementType[ElementTypes, ElementLabels, name] *: JPAArgsType[ElementTypes, ElementLabels, ttt] case "between" | "notBetween" *: ttt => ElementType[ElementTypes, ElementLabels, name] *: ElementType[ElementTypes, ElementLabels, name] *: JPAArgsType[ElementTypes, ElementLabels, ttt] case "isNull" | "isNotNull" *: ttt => JPAArgsType[ElementTypes, ElementLabels, ttt] case Any => ElementType[ElementTypes, ElementLabels, name] *: JPAArgsType[ElementTypes, ElementLabels, tt] } } case Any => JPAArgsType[ElementTypes, ElementLabels, t] } case EmptyTuple => EmptyTuple }
type MonadicJoin[T, JT] = T match { case TableSchema[t] => (T, JT) case h *: t => Concat[h *: t, (JT)] }
type UnionTo[A, B] = A match { case B => B case SqlNumberType => B match { case SqlNumberType => BigDecimal } }
type UpdateType[T <: SqlDataType] = T match { case SqlNumberType => SqlNumberType case String => String case Boolean => Boolean case Date => Date | String }
Value members
Concrete methods
Givens
Givens
Extensions
Extensions
extension [T <: SqlNumberType](e: CaseExpr[BigDecimal])(e: CaseExpr[BigDecimal])
extension [T <: SqlDataType](expr: ColumnExpr[T, _] | DynamicExpr[T])(expr: ColumnExpr[T, _] | DynamicExpr[T])
infix def toOption[R <: UpdateType[T]](value: Option[R]): (ColumnExpr[T, _] | DynamicExpr[T], Expr[_])
extension (n: Int)(n: Int)
extension (s: StringContext)(s: StringContext)
In this article