QCubed Examples Site
This is a collection of many small examples that demonstrate the functionality in QCubed. 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 Functionality.
* Some of the examples (marked with a "*") use the Examples Site Database. This database (which consists of six tables and some preloaded sample data) is included in the Examples 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 Query library which powers it.
1. Basic CodeGen - An introduction to the QCubed 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 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 - Ad Hoc Queries, Custom Load Methods, and QCubed Query
- * QCubed Query: Object Oriented Database Querying
- * QCubed Query: The Node Classes
- * QCubed Query: The Condition Classes
- * QCubed Query: The Clause Classes
- * QCubed Query: Conditional Joins
- * QCubed Query: Handling Association Tables
- * QCubed 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