In depth
From the previous chapters you already know the principle of how Jet DataModel works. But for a complete understanding, it is a good idea to study the references of all the classes that make up Jet DataModel.
Basic classes
These are the classes from which the entities - the data models of your application - must inherit.
Class | Meaning of |
---|---|
Jet\DataModel | The most basic abstract class from which other classes inherit. The main entities of the application must inherit from this class. |
Jet\DataModel_Related | Generic abstract class of all subentities in any internal session to the main entity. No subentity within an application should directly inherit from this class. |
Jet\DataModel_Related_1toN | Abstract class from which inherits application subentities that are bound to the parent entity by internal relations of type 1:N. |
Jet\DataModel_Related_1to1 | Abstract class from which inherits application subentities that are bound to the parent entity by internal relations of type 1:1. |
Definition - models (entities)
The following classes represent class definitions (i.e. class attributes converted into object form).
Class | Meaning of |
---|---|
Jet\DataModel_Definition | Basic class for working with definitions |
Jet\DataModel_Definition_Model | The base abstract class common to other classes defining entities and subentities. |
Jet\DataModel_Definition_Model_Main | The class defining the main entity. |
Jet\DataModel_Definition_Model_Related | Abstract class defining all types of subentities. |
Jet\DataModel_Definition_Model_Related_1to1 | A class defining subentity that is in a 1:1 relation to the parent. |
Jet\DataModel_Definition_Model_Related_1toN | Class defining a subentity that is in a 1:N relation to the parent. |
Definition - properties
The following classes represent class property definitions (that is, class property attributes converted to object form).
Composite keys
Class | Meaning of |
---|---|
Jet\DataModel_Definition_Key | It represents the definition of a coposite key. |
Relations
The Jet DataModel keeps together information about internal and external relations so that it can use them efficiently. Thus, the following classes are intended primarily for internal Jet DataModel needs.
Class | Meaning of |
---|---|
Jet\DataModel_Relations | A base class whose primary purpose is to record and hold information about all known relations. |
Jet\DataModel_Definition_Relation | A base abstract class representing a general relation. |
Jet\DataModel_Definition_Relation_Internal | The class represents the definition of an internal relation. |
Jet\DataModel_Definition_Relation_External | The class represents the definition of the external relation. |
Jet\DataModel_Definition_Relation_Join_Item | Defines a specific link between two properties. |
Jet\DataModel_Definition_Relation_Join_Condition | Defines the relationship between a property and a specific value. |
ID controllers
Of course, the list of controller IDs must not be missing.
Class | Meaning of |
---|---|
Jet\DataModel_IDController | General abstract class common for all ID controllers. |
Jet\DataModel_IDController_AutoIncrement | ID controller operating with a numeric sequence generated by a relational database. |
Jet\DataModel_IDController_UniqueString | ID controller generating a random text string with a timestamp at the beginning. |
Jet\DataModel_IDController_Passive | A passive ID checker that relies on the application logic to set the identification properties. |
Restricted recording mode
Within loading data, it is possible to limit the upload range by rules. The rules are of course converted to an object.
Class | Meaning of |
---|---|
Jet\DataModel_PropertyFilter | Represents the load range rules (i.e. what can be loaded) in limited upload mode. |
Queries
The following classes together form the query definition. Both queries of the SELECT type, i.e. the complete definition of what the database should retrieve, and queries from which only the WHERE part is used, i.e. for DELETE and UPDATE operations.
Class | Meaning of |
---|---|
Jet\DataModel_Query | Base class whose instance represents an abstraction of the SQL query. |
Jet\DataModel_Query_Select | Represents a list of columns to load for a SELECT query. |
Jet\DataModel_Query_Select_Item | Represents a specific column within the list for loading in a SELECT query. |
Jet\DataModel_Query_Select_Item_Expression | It represents, for example, calling a SQL function within a list to load it in a SELECT query. |
Jet\DataModel_Query_Where | Represents the entire WHERE part of all SQL queries. |
Jet\DataModel_Query_Where_Expression | Represents a specific part of the WHERE part of the SQL query. That is, a binding to a column (or part of SELECT), an operator and a value. |
Jet\DataModel_Query_Having | Represents the entire HAVING part of SQL queries of the SELECT type. |
Jet\DataModel_Query_Having_Expression | Represents a specific part of the HAVING portion of the SQL query. That is, the binding to the column (or SELECT part), operator and value. |
Jet\DataModel_Query_GroupBy | Represents the definition of the GROUP BY part of SQL queries of the SELECT type |
Jet\DataModel_Query_OrderBy | Represents the definition of the ORDER BY part of SQL queries of the SELECT type |
Jet\DataModel_Query_OrderBy_Item | This is a specific element in the ORDER BY part of the SQL query. |
Loading - iterators
In the context of loading, we talked about iterators for special data loading mode. Here they are:
Class | Meaning of |
---|---|
Jet\DataModel_Fetch | The base abstract class common to both iterators. |
Jet\DataModel_Fetch_Instances | Iterator for retrieving a list of entity instances. |
Jet\DataModel_Fetch_IDs | Iterator for retrieving a list of entity identifiers. |
Data modification
When Jet performs data storage - i.e. writes to the database (either by INSERT or UPDATE), it passes a set of data to the backend for modification in the form of instances of the following classes.
Class | Meaning of |
---|---|
Jet\DataModel_RecordData | A class represents the entire set of data to be stored. |
Jet\DataModel_RecordData_Item | A specific item in the data set to be stored. |
Backend
Class | Meaning of |
---|---|
Jet\DataModel_Backend | The base abstract class common to all backends. |
Jet\DataModel_Backend_Config | The base abstract class defining configuration common to all backends. |
Helper
The utility is designed for creating tables and updating them, or for displaying SQL queries intended for performing these operations. However, the helper is nothing more than a small facade, calling backend instances and the corresponding methods.
Class | Meaning of |
---|---|
Jet\DataModel_Helper | Facade calling backend methods designed to create and update DB tables based on definitions. |