Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Exposing the schema model

 Methods: 

  • getSchemas(): Schema[] 
  • getSchemaNames(): String[] 
  • getDefaultSchema(): Schema 
  • getSchemaByName(String): Schema 
  • getTableByQualifiedLabel(String): Table 
  • getColumnByQualifiedLabel(String): Column  

These methods allow you to explore the schema model of your datastore. You can either traverse with e.g. getSchemas (and in turn use the traversal methods of Schema and Table classes) or find specific elements using e.g. getSchemaByNamegetTableByQualifiedLabel and getColumnByQualifiedLabel.  

Querying for data

...

(read more)

Methods: 

  • parseQuery(String): Query 
  • executeQuery(Query): DataSet 

  • executeQuery(String): DataSet 

  • query(): (fluent query builder return-types)  

When we say that MetaModel offers a type-safe querying API, we mean that you can use the traversed schema model to build your queries. That way you can build queries that refer columns and tables that are guaranteed to exist and be correctly referred, since they where provided according to the metadata of the datastore.