Version 5.x

How to restrict access to EasyQuery middleware for non-authenticated users

Problem Your web application has an open part (main page, some info pages, login/registration forms) and the part that requires the authorization. And you want that the data-filtering or ad-hoc reporting functionality provided by EasyQuery be available only for authorized users. Solution Starting from version 5

Store queries in a database

Here we describe the case when all users of some web application create their own queries and would like to store those queries in some database.

Creating data model dynamically using code

To accomplish the described task, we need to perform several steps in consecutive order. First, we should add the tables our model will be based on and links between those tables. Then we add entities and attributes and connect our attributes to the tables we added before. In result of the execution of the code below, we will get a data model which consists of two tables (Customers and Orders), two entities which correspond to these tables and few attributes for each entity. Below we suppose that we already have correctly initialized DbModel and DbQuery objects (referenced as “model” and “query” correspondingly).