Packages

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.

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AliasedMappings
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AliasedMappings(tableAliases: List[(List[String], String, String)], columnAliases: List[(List[String], ColumnRef, ColumnRef)], seenTables: List[String], nextFresh: Int)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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

  5. def aliasTable(context: Context, table: String): (AliasedMappings, String)

    Alias the given table at all the paths from the context result path and below

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. val columnAliases: List[(List[String], ColumnRef, ColumnRef)]
  9. def columnForAtomicField(context: Context, fieldName: String): Option[ColumnRef]

    Returns the aliased column corresponding to the atomic field fieldName in context

  10. def columnForSqlTerm[T](context: Context, term: Term[T]): Option[ColumnRef]

    Returns the aliased columns corresponding to term in context

  11. def columnsForLeaf(context: Context, fieldName: String): List[ColumnRef]

    Returns the columns for leaf field fieldName in context

  12. def columnsForTerm(context: Context, term: Term[_]): List[ColumnRef]

    Returns the aliased columns corresponding to term in context

  13. def computeColumnAlias(table: String, col: ColumnRef): ColumnRef

    Derive a column alias for the given column in new table table

  14. def computeColumnAliases(table: String, cols: List[ColumnRef]): List[ColumnRef]

    Derive column aliases for the given columns in new table table

  15. def containsNonLeafList(query: Query, context: Context): Boolean

    Does the result of query in context contain lists of subobjects?

  16. def discriminatorColumnsForType(context: Context): List[ColumnRef]

    Returns the discriminator columns for the context type

  17. def discriminatorForType(context: Context): Option[SqlDiscriminatedType]

    Returns the discriminator for the type at context

  18. def encoderForLeaf(tpe: Type): Option[io.circe.Encoder[Any]]

    Returns the Encoder for the given type

  19. def encoderForTerm(context: Context, term: Term[_]): Option[SqlMapping.Encoder]

    Returns the Encoder for the given term in context

  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def fieldMapping(context: Context, fieldName: String): Option[SqlMapping.FieldMapping]

    Returns the field mapping for field fieldName in context if any

  22. def fieldMappingType(context: Context, fieldName: String): Option[FieldMappingType]

    Return an indicator of the kind of field mapping correspoding to fieldName in context

  23. def fresh(prefix: String): (AliasedMappings, String)

    Creates a fresh name of the form <prefix>_<unique>

  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. def isAssociative(context: Context): Boolean

    Is the context type mapped to an associative table?

  26. def isComputedField(context: Context, fieldName: String): Boolean

    Is fieldName in context computed?

  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def isJsonb(context: Context, fieldName: String): Boolean

    Is fieldName in context Jsonb?

  29. def isSqlTerm(context: Context, term: Term[_]): Boolean

    Is term in contextexpressible in SQL?

  30. def joinsForPath(context: Context, suffix: List[String]): (AliasedMappings, List[SqlJoin])

    Returns the aliased joins for traversing the path suffix from the context path

  31. 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 fieldName in context

  32. def keyColumnsForType(context: Context): List[ColumnRef]

    Returns the key columns for the context type

  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. val nextFresh: Int
  35. def nonLeafList(context: Context, fieldName: String): Boolean

    Does the type of fieldName in context represent a list of subobjects?

  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  38. def objectMapping(context: Context): Option[SqlMapping.ObjectMapping]

    Returns the object mapping for context if any

  39. def parentTableForType(context: Context): Option[TableRef]

    Returns the fully aliased table for the type at context

  40. def productElementNames: Iterator[String]
    Definition Classes
    Product
  41. def seenTable(table: String): AliasedMappings

    Record that the given table has been seen and will require an alias if if referred to again.

  42. val seenTables: List[String]
  43. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  44. val tableAliases: List[(List[String], String, String)]
  45. def unaliasColumn(col: ColumnRef): ColumnRef

    Recover the unaliased form of the given column

  46. def unaliasTable(table: String): String

    Recover the unaliased name of the given table

  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  49. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped