free amp template

Data types

What kind of data is needed?

General types of Data

What kind of objects could be expected

  • Field - a Java field, particular cell of a specified column.
    Column has value Class information included. Returned object has the same type.

    Select.one(db,tabActor.colFirstName())
       .where(tabActor.colID(),1)
       .result();

  • Entity - Java object has many fields or general objects inside. Usually a representation of a row into a table.

    Select.one(db,tabActor)
       .where(tabActor.colID(),1)
       .result();


  • Projection - Some set of cells from various columns, but not necessarily from a single table. Related to a particular row in a database.
    Projection is able to store data related to columns with the same name, but from different tables.

    Select.one(db,tabActor.colFirstName(),tabActor.colLastName())
       .where(tabActor.colID(),1)  
       .result();
     

  • FlatProjection - a projection subtype. If projection has a unique set of column names, it may be converted to FlatProjection, which is easier to handle.

    Select.one(db,tabActor.colFirstName(),tabActor.colLastName())
       .where(tabActor.colID(),1)  
       .resultAsFlat();


  • Field List - a list of fields, some cells from a particular column. The List has an object type specified in the Column.

    Select.many(db,tabActor.colFirstName())
       .where(tabActor.colID(),LT,5)
       .result();


  • Entities - collection class (List) of Entities. But not only - it's also a target, so may be used for further query executions as well.

    Select.many(db,tabActor)
       .where(tabActor.colID(),LT,5)  
       .result();


  • ProjectionBox - collection class (List) of Projections.

    Select.many(db,tabActor.colFirstName(),tabActor.colLastName())
       .where(tabActor.colID(),LT,5)
       .result(); 


  • FlatProjectionBox - collection class (List) of FlatProjections

    Select.many(db,tabActor.colFirstName(),tabActor.colLastName())
       .where(tabActor.colID(),LT,5)
       .resultAsFlat();
     

Query returned object

Depending on query parameters, select return object types are as follows

Query looking toOne resultMany results
field/column/functionValue with related typeList with related type
set of fields/columns/functionsProjectionProjectionBox (List of Projections)
entity/tableEntity specifiedEntities (List of entity objects)

© Copyright 2020 Elephant Software Klaudiusz Wojtkowiak 
e-mail: contact@daobab.io