case class AliasedMappings(tableAliases: List[(List[String], String, String)], columnAliases: List[(List[String], ColumnRef, ColumnRef)], seenTables: List[String], nextFresh: Int) extends Product with Serializable
Data structure managing DB table and column aliases.
Aliases are scoped by the result path, which is unique in the GraphQL output even in the presence of GraphQL field alises. Table aliases apply from the given output path and below.
Column aliases are synthesized whenever an SQL union has to be nested in a subquery and hence requires a uniform set of column names. These column aliases apply from the given path and above.
Tables are only aliased if they have already been seen in an depth-first in-order traversal of the output graph. This data structure also track the seen state for tables.
AliasedMappings also maintains the bookeeping information needed to supply arbitrary fresh names. Currently these are used to name identity/predicate joins.
- Alphabetic
- By Inheritance
- AliasedMappings
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def aliasColumns(context: Context, cols: List[ColumnRef], aliasedCols: List[ColumnRef]): (AliasedMappings, List[ColumnRef])
Alias the given columns to the suppiled aliased columns from the context result path and above
- def aliasTable(context: Context, table: String): (AliasedMappings, String)
Alias the given table at all the paths from the context result path and below
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val columnAliases: List[(List[String], ColumnRef, ColumnRef)]
- def columnForAtomicField(context: Context, fieldName: String): Option[ColumnRef]
Returns the aliased column corresponding to the atomic field
fieldNameincontext - def columnForSqlTerm[T](context: Context, term: Term[T]): Option[ColumnRef]
Returns the aliased columns corresponding to
termincontext - def columnsForLeaf(context: Context, fieldName: String): List[ColumnRef]
Returns the columns for leaf field
fieldNameincontext - def columnsForTerm(context: Context, term: Term[_]): List[ColumnRef]
Returns the aliased columns corresponding to
termincontext - def computeColumnAlias(table: String, col: ColumnRef): ColumnRef
Derive a column alias for the given column in new table
table - def computeColumnAliases(table: String, cols: List[ColumnRef]): List[ColumnRef]
Derive column aliases for the given columns in new table
table - def containsNonLeafList(query: Query, context: Context): Boolean
Does the result of
queryincontextcontain lists of subobjects? - def discriminatorColumnsForType(context: Context): List[ColumnRef]
Returns the discriminator columns for the context type
- def discriminatorForType(context: Context): Option[SqlDiscriminatedType]
Returns the discriminator for the type at
context - def encoderForLeaf(tpe: Type): Option[io.circe.Encoder[Any]]
Returns the
Encoderfor the given type - def encoderForTerm(context: Context, term: Term[_]): Option[SqlMapping.Encoder]
Returns the
Encoderfor the given term incontext - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def fieldMapping(context: Context, fieldName: String): Option[SqlMapping.FieldMapping]
Returns the field mapping for field
fieldNameincontextif any - def fieldMappingType(context: Context, fieldName: String): Option[FieldMappingType]
Return an indicator of the kind of field mapping correspoding to
fieldNameincontext - def fresh(prefix: String): (AliasedMappings, String)
Creates a fresh name of the form <prefix>_<unique>
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def isAssociative(context: Context): Boolean
Is the context type mapped to an associative table?
- def isComputedField(context: Context, fieldName: String): Boolean
Is
fieldNameincontextcomputed? - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isJsonb(context: Context, fieldName: String): Boolean
Is
fieldNameincontextJsonb? - def isSqlTerm(context: Context, term: Term[_]): Boolean
Is
termincontextexpressible in SQL? - def joinsForPath(context: Context, suffix: List[String]): (AliasedMappings, List[SqlJoin])
Returns the aliased joins for traversing the path
suffixfrom the context path - def joinsForSubObject(context: Context, fieldName: String, resultName: String, plural: Boolean): (AliasedMappings, List[SqlJoin])
Returns the aliased joins for constructing the subobject corresponding to the field
fieldNameincontext - def keyColumnsForType(context: Context): List[ColumnRef]
Returns the key columns for the context type
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nextFresh: Int
- def nonLeafList(context: Context, fieldName: String): Boolean
Does the type of
fieldNameincontextrepresent a list of subobjects? - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def objectMapping(context: Context): Option[SqlMapping.ObjectMapping]
Returns the object mapping for
contextif any - def parentTableForType(context: Context): Option[TableRef]
Returns the fully aliased table for the type at
context - def productElementNames: Iterator[String]
- Definition Classes
- Product
- def seenTable(table: String): AliasedMappings
Record that the given table has been seen and will require an alias if if referred to again.
- val seenTables: List[String]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val tableAliases: List[(List[String], String, String)]
- def unaliasColumn(col: ColumnRef): ColumnRef
Recover the unaliased form of the given column
- def unaliasTable(table: String): String
Recover the unaliased name of the given table
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated