DataContext

The DataContext interface is probably the most central construct in MetaModel. The DataContext can be compared to a "connection" to the datastore that you're working with. The DataContext exposes methods to explore the schema model and to query the data of a datastore.

Exposing the schema model

Methods:

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. getSchemaByName, getTableByQualifiedLabel and getColumnByQualifiedLabel.

Querying for data

Methods:

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.

DataContext (last edited 2013-08-01 11:00:34 by KasperSorensen)