Skip to content

BlackBeltTechnology/judo-meta-query

Repository files navigation

judo-meta-query

badge

1. Introduction

This repository contains the Query meta model.

It acts as an eclipse plugin with features and sites, can be used standalone and in standard OSGi (without eclipse).

This is not an SQL model, but a model representing transformation logic for Expression-based queries. The output of this is used later for RDBMS query generation.

2. Context

This project is a building block of the judo-community aggregator project. In order to better understand how this module fits into our ecosystem, please check the corresponding documentation!

3. Contributing to the project

Everyone is welcome to contribute to JUDO! As a starter, please read the corresponding CONTRIBUTING guide for details!

4. License

This project is licensed under the Eclipse Public License - v 2.0.

5. Query meta model notes

5.1. Node

  • getType(): returns EClass type representing an entity

  • not all of its relations can be used everywhere

5.2. Select: actual "select" for an entity

  • from: the (EClass) entity to be selected

  • each transferobject has 1 relevant select

5.3. Subselects

  • in runtime it is the query

  • transferRelation: a relation to be used for subselect

  • used to navigate on relations

  • embedded select: workaround to be able to contain a select if it’s not available from TO-s

  • base: navigation start

5.4. SubSelectFeature

  • subselects used in "where" part

5.5. Targets: projection

  • describes how to represent the result returned from the query

5.6. Join

  • getBase(): to what it is joined (recursively queries partners)

5.7. Feature

  • "Something" (possibly an attribute, calculated value, constants etc.) that the select or join returns

  • target mapping: the attribute type of the result from feature

5.8. FeatureWithNode

  • features that has strong relation to entities

  • <|-- Attribute: entity attribute

  • <|-- idAttribute: entity id

  • <|-- TypeAttribute: entity type, version, create time etc.

5.9. EntityTypeName

  • used with inheritance

5.10. Variable

  • category and name + type → e.g.: String!getVariable(…​, …​)