Packages

package orm

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class AlwaysOne[Schema[_]](children: List[Schema[_]]) extends ChildrenInSchema[Schema] with Product with Serializable
  2. trait AsDebugString[Schema[_]] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  3. case class BatchDetails(batchSize: Int, index: Int, whereForTable: WhereForTable) extends Product with Serializable
  4. sealed trait BulkDataPointer extends AnyRef
  5. sealed trait ChildArity extends AnyRef
  6. trait ChildBulkDataPointer extends BulkDataPointer
  7. sealed trait ChildEntity extends OrmEntity
  8. trait ChildOrmBulkData[E] extends OrmBulkData[E]
  9. sealed abstract class ChildrenInSchema[Schema[_]] extends AnyRef
  10. case class EntityAndFieldsAndPath[E <: OrmEntity](entity: E, fieldsAndPath: OrmGettersAndPath) extends Product with Serializable
  11. case class EntityAndPath[E <: OrmEntity](entity: E, paths: Array[List[Int]]) extends Product with Serializable
  12. case class EntityStrategy[X](mainEntityFn: (MainEntity) ⇒ X, childFn: (OrmEntity) ⇒ (ChildEntity) ⇒ X) extends Product with Serializable
  13. case class FanInOrmData[Context, T](t: T, name: String, idInParentData: GetKey, idForChild: GetKey, executeWhenMatch: (Context, T, List[Any]) ⇒ Context, data: Array[List[Any]], children: List[OrmData[Context]]) extends OrmData[Context] with Product with Serializable
  14. case class FanoutOrmData[Context, T](t: T, name: String, flyweightKey: FlyweightKey, executeWhenMatch: (Context, T, List[Any]) ⇒ Context, ar: Array[List[Any]], children: List[OrmData[Context]]) extends OrmData[Context] with Product with Serializable

    The data read from the database by ORM.

    The data read from the database by ORM. Later this should be replaceable by a cursor

    This is just for the 'numeric keys' story

    So important features:*

    • We need to process one to many tables and their children sensibly using the next mechanism
    • That means we will process all the things for my id, and then tell the children The data is sorted by id. Children are sorted by child Id Note that we need the id to by ordered... ANd that's awkward because we don't know how big the composible key is... suppose we have Keys1(a), Keys2(a,b), Keys3(a,b,c)... ah do we actually need the id or can we go flyweight?
  15. trait FastOrmSql extends AnyRef

    This is the layer of abstraction that needs to be rewritten for different databases.

    This is the layer of abstraction that needs to be rewritten for different databases. It's just a block of sql for each operation

  16. trait FastReader[T] extends (MainEntity) ⇒ (Int) ⇒ Stream[T]
  17. trait FastReaderDal extends AnyRef
  18. class FastReaderImpl[T] extends FastReader[T]
  19. trait FieldFilter[F[_]] extends AnyRef
  20. case class FieldType[T](name: String, typeName: String, numericSort: Boolean)(implicit writeToJson: WriteToJson[T], getFromJson: GetFromJson[T], classTag: ClassTag[T]) extends Product with Serializable
  21. case class FieldTypeAndIndex[T](fieldType: FieldType[T], index: Int) extends Product with Serializable
  22. trait FieldTypeToIndex extends AnyRef
  23. trait FindOrmEntityAndField[Schema[_]] extends AnyRef

    Asingle item in the schema might be in several places in the database (a key/a foreign key).

    Asingle item in the schema might be in several places in the database (a key/a foreign key). That item might be represented by multiple fields (e.g. a composite string, or a date where the date is stored in multiple fields

    here the list reflects the multiple places (keys/foreign keys) and the value getter itself understands about getting values

  24. trait FlyweightKey extends Comparator[List[Any]]
  25. case class FoundChildBulkDataPointer(nth: Int, indexIntoBulkData: Int, parentId: Any, bulkData: ChildOrmBulkData[_], children: List[ChildBulkDataPointer]) extends ChildBulkDataPointer with Product with Serializable
  26. class GetKey extends (List[Any]) ⇒ Any
  27. case class IDWhereForTable[ID](idField: FieldType[ID], id: ID) extends WhereForTable with Product with Serializable
  28. trait IsLinkFieldFilter[F[_]] extends FieldFilter[F]
  29. trait IsObjectFieldFilter[F[_]] extends FieldFilter[F]
  30. trait IsSimpleFieldFilter[F[_]] extends FieldFilter[F]
  31. trait JsonToStream[Context, F[_], T] extends AnyRef
  32. trait JsonToStreamFor[Context, Schema[_]] extends AnyRef
  33. case class Key2(key1: FlyweightKey, key2: FlyweightKey) extends FlyweightKey with Product with Serializable
  34. case class KeyInt(leftIndex: Int, rightIndex: Int) extends FlyweightKey with Product with Serializable
  35. case class KeyString(leftIndex: Int, rightIndex: Int) extends FlyweightKey with Product with Serializable
  36. case class Keys(list: List[FieldType[_]]) extends Product with Serializable
  37. case class KeysAndIndex(list: List[(Int, FieldType[_])]) extends Product with Serializable
  38. trait LinkBuilder[F[_], Data] extends AnyRef
  39. case class MainBulkData(ormEntity: MainEntity, tableNameToData: Map[String, List[List[Any]]], children: List[ChildOrmBulkData[_]]) extends OrmBulkData[MainEntity] with Product with Serializable
  40. case class MainBulkDataPointer(nth: Int, bulkData: OrmBulkData[_], children: List[ChildBulkDataPointer]) extends BulkDataPointer with Product with Serializable
  41. case class MainEntity(tableName: TableName, alias: String, primaryKeyField: Keys, dataFields: List[FieldType[_]], children: List[ChildEntity]) extends OrmEntity with Product with Serializable
  42. case class MainOrmData[Context, T](t: T, name: String, contextMaker: () ⇒ Context, executeWhenMatch: (Context, T, List[Any]) ⇒ Context, ar: Array[List[Any]], children: List[OrmData[Context]]) extends Product with Serializable
  43. case class ManyToOneBulkData(parentEntity: OrmEntity, ormEntity: ManyToOneEntity, tableNameToData: Map[String, List[List[Any]]], children: List[ChildOrmBulkData[_]]) extends ChildOrmBulkData[ManyToOneEntity] with Product with Serializable
  44. case class ManyToOneEntity(tableName: TableName, alias: String, primaryKeyField: Keys, idInParent: Keys, dataFields: List[FieldType[_]], children: List[ChildEntity]) extends SingleChild with Product with Serializable

    this is typically a look up reference.

    this is typically a look up reference. It is very similar to 'oneToZeroOneEntity' except that many of the parent are likely to share the same value. Thus it won't be in sync

  45. case class NullBulkDataPointer(bulkData: ChildOrmBulkData[_], children: List[ChildBulkDataPointer]) extends ChildBulkDataPointer with Product with Serializable
  46. class NumericKeyPopulator[Schema[_]] extends (Array[Any], OrmEntity, List[Any]) ⇒ Array[Any]
  47. case class OneToManyBulkData(parentEntity: OrmEntity, ormEntity: OneToManyEntity, tableNameToData: Map[String, List[List[Any]]], children: List[ChildOrmBulkData[_]]) extends ChildOrmBulkData[OneToManyEntity] with Product with Serializable
  48. case class OneToManyEntity(tableName: TableName, alias: String, primaryKeyField: Keys, parentId: Keys, dataFields: List[FieldType[_]], children: List[ChildEntity]) extends ChildEntity with Product with Serializable
  49. case class OneToZeroOneEntity(tableName: TableName, alias: String, primaryKeyField: Keys, idInParent: Keys, dataFields: List[FieldType[_]], children: List[ChildEntity]) extends SingleChild with Product with Serializable

    This will have zero or one entries for each item in the parent.

    This will have zero or one entries for each item in the parent. It will be in 'step' with it... allowing cursors to advance together

  50. case class OrmBatchConfig(dataSource: DataSource, batchSize: Int, whereForTable: WhereForTable = NullWhereForTable) extends Product with Serializable
  51. trait OrmBulkData[E] extends AnyRef
  52. trait OrmData[Context] extends AnyRef
  53. trait OrmDataFactory[MainT, T] extends AnyRef
  54. class OrmDataFactoryForMainEntity extends OrmDataFactory[MainEntity, OrmEntity]
  55. trait OrmEntity extends FieldTypeToIndex
  56. trait OrmFactory[Schema[_]] extends AnyRef
  57. class OrmFactoryImpl[Schema[_]] extends OrmFactory[Schema]
  58. case class OrmGettersAndPath(ormValueGetters: Array[OrmValueGetter[_]], path: Array[Array[Int]], indicies: Array[Int]) extends Product with Serializable

    the orm getter is 'given this data from the database table what is the result.

    the orm getter is 'given this data from the database table what is the result. Path and index and where to put the result when we get it

  59. case class OrmGettersForThisRowAndPath(ormValueGetters: Array[OrmValueGetterForARow[_]], path: Array[Array[Int]], indicies: Array[Int]) extends Product with Serializable
  60. case class OrmKey[Schema[_], T](arity: ChildArity, key: String, t: Schema[T], path: List[Int], index: Int, children: OrmKeys[Schema]) extends Product with Serializable
  61. case class OrmKeys[Schema[_]](links: List[OrmKey[Schema, _]], objects: List[OrmKey[Schema, _]], simple: List[OrmKey[Schema, _]]) extends Product with Serializable

    The data in the database is based on tables The data we want in our json or objects is based on an objectgraph There has to be a mapping between the data in the database and the object graph: this is it

    The data in the database is based on tables The data we want in our json or objects is based on an objectgraph There has to be a mapping between the data in the database and the object graph: this is it

    Example: We have a schema: main: key1 table1/field1 key2 table2/field1 child: childKey1 table1/field2 As can be seen there isn't a simple mapping

    This heavily uses type classes, so you can use your own (perhaps existing) schema object. SchemaMapKey[Schema] -> This is how we know what keys exist and what children exist.

    Utility putJson: Very useful if you are using APIs because it writes to an outputstream and is much less garbage/memory intensive than turning to a string first toJson: Nicer interface than putJson

    Debugging: prettyPrint is really helpful for understanding the schema. It is intended for use in tests printArray prints the array of data retrieved from FastOrm in a way helpful for tests

  62. trait OrmKeysToJson[Context, Schema[_]] extends AnyRef
  63. trait OrmMaker[T] extends (MainEntity) ⇒ (Map[OrmEntity, List[List[AnyRef]]]) ⇒ Stream[T]
  64. class OrmMakerForArrayAny[Schema[_]] extends OrmMaker[Array[Any]]
  65. class OrmMakerForArrayAnyUsingOrmData[Schema[_]] extends OrmMaker[Array[Any]]
  66. trait OrmStrategies extends AnyRef
  67. case class OrmValueGetter[T](tableName: TableName, fieldTypes: List[FieldType[_]])(implicit tx: OrmValueTransformer[T]) extends Product with Serializable
  68. case class OrmValueGetterForARow[T](tableName: TableName, fieldTypes: Array[FieldTypeAndIndex[_]], tx: OrmValueTransformer[T]) extends Product with Serializable
  69. trait OrmValueTransformer[T] extends (Array[FieldTypeAndIndex[_]], Array[Any]) ⇒ T
  70. case class PartitionedSchema[Schema[_]](key: String, links: List[Schema[_]], simple: List[Schema[_]], singleChildObjects: List[PartitionedSchema[Schema]], manyChildObjects: List[(TableName, PartitionedSchema[Schema])]) extends Product with Serializable
  71. trait Placeholder extends AnyRef
  72. case class SameIdBulkData(ormEntity: SameIdEntity, tableNameToData: Map[String, List[List[Any]]], children: List[ChildOrmBulkData[_]]) extends ChildOrmBulkData[SameIdEntity] with Product with Serializable
  73. case class SameIdEntity(tableName: TableName, alias: String, primaryKeyField: Keys, dataFields: List[FieldType[_]], children: List[ChildEntity]) extends SingleChild with Product with Serializable
  74. trait SchemaMapKey[Schema[_]] extends AnyRef

    THere is a schema of type Schema.

    THere is a schema of type Schema. Schema is not the data, is the structure of the data

    The type parameter is the type of the data in the field that the schema is pointing to. This is used for things like 'getting from database' and 'putting in json'.

    Because schemas hold other schemas, and I am not sure how to handle the schema object itself from a [T] perspective there is a fake T called Placeholder.

  75. trait SingleChild extends ChildEntity
  76. class StreamArrayAnyForOneEntity[Schema[_]] extends (Map[OrmEntity, List[List[AnyRef]]]) ⇒ Stream[Array[Any]]
  77. class StreamArrayAnyForOneEntity2[Schema[_]] extends (Map[OrmEntity, List[List[AnyRef]]]) ⇒ Stream[Array[Any]]
  78. case class TableAndFieldType[T](tableName: TableName, fieldType: FieldType[T]) extends Product with Serializable
  79. case class TableAndFieldTypes[Context, T](tableName: TableName, fieldType: List[FieldType[_]])(implicit tx: ValueFromMultipleTableFields[Context, T]) extends Product with Serializable
  80. case class TableName(tableName: String, description: String) extends Product with Serializable
  81. trait TableNameForManySchema[Schema[_]] extends AnyRef
  82. case class TablesAndFieldsAndPaths(map: Map[TableName, OrmGettersAndPath]) extends Product with Serializable
  83. class TaglessOrm extends AnyRef

    The journey of data seems to be

    The journey of data seems to be

    Put into temporary tables Read into memory Transform into a 'thing. Could be a domain object, but usually just seem to want to transform it into list/map/primitive The OrmKeys story is about how to turn it list/map/primitive

    Now we tried the arrays story, and it looks too hard for now. Basically it's a great future optimisation, but too brittle at this stage. The arrays story says 'really efficient/read straight from cursor with no intermediate into the list/map/primitive recognising that the list/map/primitive has a different (configurable) structure.

    So can I do something around Tagless Interpreters to walk the object graph in the raw data. Reasons for doing this including debugging/tracing/documentation/understanding

  84. trait ToFieldType[T] extends AnyRef
  85. trait ToTableAndFieldTypes[Context, Schema[_]] extends AnyRef
  86. trait ToWritableForm[T] extends (T) ⇒ List[(OrmEntity, List[List[AnyRef]])]
  87. trait ValueFromMultipleTableFields[Context, T] extends AnyRef
  88. trait WhereForTable extends SetParams[PreparedStatement]
  89. trait Write[T] extends AnyRef
  90. class WriteOrm extends AnyRef
  91. class WriteToJsonForSchema[Schema[_], Context] extends AnyRef
  92. case class Zero[Schema[_]]() extends ChildrenInSchema[Schema] with Product with Serializable
  93. case class ZeroOrMore[Schema[_]](children: List[Schema[_]]) extends ChildrenInSchema[Schema] with Product with Serializable

Value Members

  1. object AsDebugString
  2. object BulkDataPointer
  3. object ChildArity
  4. object ChildEntity
  5. object EntityAndPath extends Serializable
  6. object EntityStrategy extends Serializable
  7. object FastOrmSql
  8. object FastReader
  9. object FastReaderDal
  10. object FieldFilter
  11. object FieldType extends Serializable
  12. object FlyweightKey
  13. object IsObjectFieldFilter
  14. object IsSimpleFieldFilter
  15. object JsonToStream
  16. object Keys extends Serializable
  17. object MainBulkData extends Serializable
  18. object ManyChildren extends ChildArity with Product with Serializable
  19. object NoChildren extends ChildArity with Product with Serializable
  20. object NullWhereForTable extends WhereForTable with Product with Serializable
  21. object OneChild extends ChildArity with Product with Serializable
  22. object OrmData
  23. object OrmKeys extends Serializable
  24. object OrmKeysToJson
  25. object OrmMaker
  26. object OrmStrategies extends OrmStrategies

    This applies the sql defined in FastOrmSql to the entities in a composite entity

  27. object OrmValueTransformer
  28. object PartitionedSchema extends Serializable
  29. object SchemaMapKey
  30. object TableAndFieldType extends Serializable
  31. object ToFieldType
  32. object ValueFromMultipleTableFields

Ungrouped