Data¶
Data documentation explains how DataFlex TechStack applications define persistent data, connect it to storage, work with records through Data Dictionaries, relate and constrain DD rows, validate data, keep command-style code readable, group related changes in transactions, and bind UI controls to local Data Dictionary buffers.
TechStack data code is built around entity metadata and Data Dictionary objects rather than shared global file buffers. Entities describe the persistent model. Connections and drivers choose the storage backend. Data Dictionaries own local record buffers and coordinate find, save, delete, validation, relation, and binding behavior.
Data layer at a glance¶
| Layer | Use it for | Start here |
|---|---|---|
| Entity model | Define tables, fields, indexes, relations, and metadata in source code. | Entities |
| Connections | Map entity connection IDs to connection URIs and driver objects. | Connections |
| Drivers | Implement a storage adapter behind Data Dictionary operations. | Building Database Drivers |
| Data Dictionaries | Own local buffers, field rules, related DDs, validation hooks, and adapter/database operations. | Data Dictionaries |
| Relations and Constraints | Connect related DDs and limit visible rows through relations and constraints. | Relations and Constraints |
| Validations | Check or adjust DD buffer values before save, find, or field workflows continue. | Validations |
| Command API | Port or write command-style database calls that target Data Dictionary objects. | Command API |
| Transactions | Group related DD create, update, and delete operations. | Transactions |
| Data Binding | Bind UI controls and columns to Data Dictionary fields and back-end calculated values. | Data Binding |
How the pieces fit together¶
Entities -> Connections -> Drivers
| ^
v |
Data Dictionaries ------------+
|
+-> Relations and Constraints
+-> Validations
+-> Command API
+-> Transactions
+-> Data Binding
A typical application defines entities first, assigns each entity to a logical connection, registers a driver for that connection, and then attaches Data Dictionary classes to the entities. The Data Dictionary becomes the main application-facing API for local buffers, record operations, related DDs, validation, and UI binding.
Reading path¶
- Start with Entities to define the persistent model in source code.
- Use Connections to map entity connection names to storage.
- Read Building Database Drivers when you need to implement or extend a driver behind the Data Dictionary adapter messages.
- Use Data Dictionaries to attach entities to local buffers, field rules, related DDOs, and adapter/database operations.
- Use Relations and Constraints to connect related DDs and limit visible rows.
- Use Validations for validation events, field options, custom validators, and value-adjustment rules.
- Use Command API when porting or choosing command-style database calls that target Data Dictionary objects.
- Use Transactions to group related DD create, update, and delete operations.
- Finish with Data Binding to bind UI controls to Data Dictionary object buffers, including back-end calculated values.
API reference shortcuts¶
cEntityexposes runtime APIs for inspecting entity metadata.cDataDictionaryexposes the Data Dictionary API for local buffers, field options, validation, relations, find/save/delete operations, and adapter-backed persistence.cDbQueryexposes ad hoc Data Dictionary-backed query APIs.cDbConnectionManagerexposes connection and driver registration APIs.cDbTransactionManagerexposes transaction coordination APIs.- DBP Types and Driver/Adapter Protocol define the driver message protocol.
- DEO Binding documents UI binding protocols.