QCubed-4 Examples Site
This is a collection of many small examples that demonstrate the functionality in QCubed-4. Later examples tend to build upon functionality or concepts that are discussed in prior ones, which allows the Examples site to be viewed as a quasi-tutorial. However, you should still feel free to check out any of the examples as you wish.
The Examples are broken into three main parts: the Code Generator, the Forms and Control Library, and Other QCubed-4 Functionality.
* Some of the examples (marked with a "*") use the Example Site Database. This database (which consists of six tables and some preloaded sample data) is included in the Example Site directories. See Basic CodeGen > About the Database for more information.
The Code Generator is at the heart of the Model in the MVC (Model, View, Controller) architecture. It uses the data model you have defined to create all your data objects, relationships and CRUD functionality.
Sections 1–3 look specifically at the Code Generator, the Object Relational Model it creates, and the QCubed-4 Query library which powers it.
1. Basic CodeGen - An introduction to the QCubed-4 Code Generator
- (About Sections 1-3)
- About the Database
- * Object Relational Model
- * Loading Objects
- * Saving and Deleting
- * Relationships (Foreign Keys)
- * Reverse Relationships (One-to-One and One-to-Many)
- * Many-to-Many Relationships
- Defining Relationships without Foreign Keys
- Explanation of QCubed-4 Primary Key Requirement
2. More About the Object Relational Model - Looking more in depth at the functionality of the generated ORM
- * Sorting and Limiting Array Results
- * Late Binding of Related Objects
- * Early Binding of Related Objects
- * Type Tables
- * Customized Business Logic
- * Customized Load Methods
- * Optimistic Locking
3. Querying in QCubed-4 - Ad Hoc Queries, Custom Load Methods, and QCubed-4 Query
- * QCubed-4 Query: Object Oriented Database Querying
- * QCubed-4 Query: The Node Classes
- * QCubed-4 Query: The Condition Classes
- * QCubed-4 Query: The Clause Classes
- * QCubed-4 Query: Conditional Joins
- * QCubed-4 Query: Handling Association Tables
- * QCubed-4 Query: Handling Reverse Relationships
- * ExpandAsArray: Multiple related tables in one swift query
- * SQL Aliases for QQuery
- * Picking database columns for QQuery
- * SQL functions and math operations for QQuery
- * Custom SQL Subqueries for QQuery
- * Performing Custom SQL Queries
- * Virtual Attributes and Custom SQL