mirror of
https://github.com/silverqx/TinyORM.git
synced 2025-12-20 09:59:53 -06:00
docs added API Stability boxes and a new page
This commit is contained in:
@@ -5,6 +5,8 @@ description: Hello world example created in the terminal and QtCreator IDE.
|
||||
keywords: [c++ orm, building, hello world, tinyorm]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
import CodeBlock from '@theme/CodeBlock'
|
||||
import TabItem from '@theme/TabItem'
|
||||
import Tabs from '@theme/Tabs'
|
||||
@@ -41,6 +43,10 @@ import {
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
We will try to create the simplest working console application, in the terminal with the `CMake` and in the `QtCreator IDE` with the `qmake` build systems.
|
||||
|
||||
The `HelloWorld` example also expects the following [folders structure](building/tinyorm.mdx#folders-structure), let's create them.
|
||||
|
||||
@@ -45,6 +45,10 @@ import {
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
We will try to create a working migrations console application called as <abbr title='TinyORM migrations'>`tom`</abbr> in the terminal with the `CMake` and in the `QtCreator IDE` with the `qmake` build systems.
|
||||
|
||||
The `tom` console application also expects the following [folders structure](building/tinyorm.mdx#folders-structure), let's create them.
|
||||
|
||||
@@ -53,6 +53,10 @@ import {
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
The build systems supported out of the box are `CMake` and `qmake`.
|
||||
|
||||
:::info
|
||||
|
||||
@@ -5,6 +5,8 @@ description: TinyORM makes interacting with a database extremely simple using ra
|
||||
keywords: [c++ orm, database, getting started, tinyorm]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
import TabItem from '@theme/TabItem'
|
||||
import Tabs from '@theme/Tabs'
|
||||
|
||||
@@ -30,6 +32,10 @@ import {
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
Almost every modern application interacts with a database. TinyORM makes interacting with a database extremely simple using raw SQL, a [fluent query builder](database/query-builder.mdx), and the [TinyORM](tinyorm/getting-started.mdx). Currently, TinyORM provides first-party support for four databases:
|
||||
|
||||
<div id='databases-supported-versions'>
|
||||
|
||||
@@ -5,6 +5,8 @@ description: Migrations are like version control for your database, allowing you
|
||||
keywords: [c++ orm, database, migrations, tinyorm]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
import APITable from '@theme/APITable'
|
||||
import CodeBlock from '@theme/CodeBlock'
|
||||
import TabItem from '@theme/TabItem'
|
||||
@@ -46,6 +48,10 @@ import {
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
Migrations are like version control for your database, allowing your team to define and share the application's database schema definition. If you have ever had to tell a teammate to manually add a column to their local database schema after pulling in your changes from source control, you've faced the problem that database migrations solve.
|
||||
|
||||
The TinyORM `Schema` facade provides database agnostic support for creating and manipulating tables across all of TinyORM's supported database systems. Typically, migrations will use this facade to create and modify database tables and columns.
|
||||
|
||||
@@ -41,6 +41,10 @@ import Link from '@docusaurus/Link'
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
TinyORM's database query builder provides a convenient, fluent interface to creating and running database queries. It can be used to perform most database operations in your application.
|
||||
|
||||
The TinyORM query builder uses `QSqlQuery` parameter binding to protect your application against SQL injection attacks. There is no need to clean or sanitize strings passed to the query builder as query bindings.
|
||||
|
||||
@@ -5,6 +5,8 @@ description: TinyORM includes the ability to seed your database with data using
|
||||
keywords: [c++ orm, database, seeder, seeding, tinyorm]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
# Database: Seeding
|
||||
|
||||
- [Introduction](#introduction)
|
||||
@@ -14,6 +16,10 @@ keywords: [c++ orm, database, seeder, seeding, tinyorm]
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
TinyORM includes the ability to seed your database with data using seed classes. All seed classes should be stored in the `database/seeders` directory. The `DatabaseSeeder` class is considered as the root seeder. From this class, you may use the `call` method to run other seed classes, allowing you to control the seeding order.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
sidebar_position: 8
|
||||
sidebar_label: 📄 Features Summary
|
||||
hide_table_of_contents: true
|
||||
description: List that fastly summarizes all TinyORM features.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
sidebar_position: 9
|
||||
sidebar_label: ❤️ Sponsors
|
||||
hide_table_of_contents: true
|
||||
description: How to sponsor and support the TinyORM project.
|
||||
|
||||
28
docs/stability.mdx
Normal file
28
docs/stability.mdx
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
sidebar_label: 🚩 Stability
|
||||
hide_table_of_contents: true
|
||||
description: Describes and summarizes Stability Indexes for TinyORM library.
|
||||
keywords: [c++ orm, tinyorm, features, modules, stability]
|
||||
---
|
||||
|
||||
# Stability
|
||||
|
||||
- [Stability Indexes](#stability-index)
|
||||
|
||||
## Stability Indexes
|
||||
|
||||
<div class="api-stability alert alert--info">
|
||||
__Stability: 0 - Experimental__ : The feature is still under development.<br/>
|
||||
<small>Currently, no module/feature is in this Stability Category.</small>
|
||||
</div>
|
||||
|
||||
<div class="api-stability alert alert--warning">
|
||||
__Stability: 1 - Preview__ : The feature is almost done, but still can contain some glitches.<br/>
|
||||
<small>Currently, only [TinyORM: Relationships](tinyorm/relationships.mdx) module is in this Stability Category, the reason why is described on its page.</small>
|
||||
</div>
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
__Stability: 2 - Stable__ : The feature is ready for __Production__ use, everything works as was intended.<br/>
|
||||
<small>All `TinyORM` other modules are considered Stable.</small>
|
||||
</div>
|
||||
@@ -5,6 +5,8 @@ description: The TinyDrivers library is an underlying SQL database layer for Tin
|
||||
keywords: [c++ orm, database, getting started, tinydrivers, sql drivers]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
# TinyDrivers: Getting Started
|
||||
|
||||
- [Introduction](#introduction)
|
||||
@@ -15,6 +17,10 @@ keywords: [c++ orm, database, getting started, tinydrivers, sql drivers]
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
The `TinyDrivers` library is an underlying SQL database layer for `TinyORM`. It can be used instead of the `QtSql` module, can be <u>__swapped__</u> at compile time, and has __1:1__ API as the `QtSql` module. 😮 Swapping is controlled by the `qmake` and `CMake` build system options.
|
||||
|
||||
It was designed to drop the `QtSql` dependency while maintaining backward compatibility and without the need for any code changes after the swap.
|
||||
|
||||
@@ -5,6 +5,8 @@ description: Attribute casting allows you to transform TinyORM attribute values
|
||||
keywords: [c++ orm, orm, casts, casting, attributes, tinyorm]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
# TinyORM: Casting
|
||||
|
||||
- [Introduction](#introduction)
|
||||
@@ -16,6 +18,10 @@ keywords: [c++ orm, orm, casts, casting, attributes, tinyorm]
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
Attribute casting allows you to transform TinyORM attribute values when you retrieve them on model instances. For example, you may want to convert a `datetime` string that is stored in your database to the `QDateTime` instance when it is accessed via your TinyORM model. Or, you may want to convert a `tinyint` number that is stored in the database to the `bool` when you access it on the TinyORM model.
|
||||
|
||||
## Accessors
|
||||
|
||||
@@ -5,6 +5,8 @@ description: The ModelsCollection is specialized container which provides a flue
|
||||
keywords: [c++ orm, orm, collections, collection, model, tinyorm]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
# TinyORM: Collections
|
||||
|
||||
- [Introduction](#introduction)
|
||||
@@ -13,6 +15,10 @@ keywords: [c++ orm, orm, collections, collection, model, tinyorm]
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
The `Orm::Tiny::Types::ModelsCollection` is specialized container which provides a fluent, convenient wrapper for working with vector of models. All TinyORM methods that return more than one model result, will return instances of the `ModelsCollection` class, including results retrieved via the `get` method or methods that return relationships like the `getRelation` and `getRelationValue`.
|
||||
|
||||
The `ModelsCollection` class extends `QList<Model>`, so it naturally inherits dozens of methods used to work with the underlying vector of TinyORM models. Be sure to review the [`QList`](https://doc.qt.io/qt/qlist.html) documentation to learn all about these helpful methods!
|
||||
|
||||
@@ -38,6 +38,10 @@ import Link from '@docusaurus/Link'
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
TinyORM is an object-relational mapper (ORM) that makes it enjoyable to interact with your database. When using TinyORM, each database table has a corresponding "Model" that is used to interact with that table. In addition to retrieving records from the database table, TinyORM models allow you to insert, update, and delete records from the table as well.
|
||||
|
||||
:::note
|
||||
|
||||
@@ -5,6 +5,8 @@ description: TinyORM relationships are defined as methods on your TinyORM model
|
||||
keywords: [c++ orm, relationships, relations, tinyorm]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
# TinyORM: Relationships
|
||||
|
||||
- [Introduction](#introduction)
|
||||
@@ -32,6 +34,11 @@ keywords: [c++ orm, relationships, relations, tinyorm]
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--warning">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 1__</Link> - Preview<br/>
|
||||
<small>High memory consumption during compilation using the `GCC` compiler if the number of TinyORM model instantiations with deep __Relationships__ is counting in hundreds or thousands (eg. like TinyORM functional tests). Generated executables are fine and are small. This is not a problem if only a few hundred instantiations are being done. Other compilers like `MSVC` or `Clang` are fine.</small>
|
||||
</div>
|
||||
|
||||
Database tables are often related to one another. For example, a blog post may have many comments or an order could be related to the user who placed it. TinyORM makes managing and working with these relationships easy, and supports basic relationships:
|
||||
|
||||
- [One To One](#one-to-one)
|
||||
|
||||
@@ -5,6 +5,8 @@ description: TinyORM models serialization allows you to serialize models and col
|
||||
keywords: [c++ orm, orm, serialization, json, toJson, serializing models, serializing relations, serializing collections, converting, toList, toMap]
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
# TinyORM: Serialization
|
||||
|
||||
- [Introduction](#introduction)
|
||||
@@ -17,6 +19,10 @@ keywords: [c++ orm, orm, serialization, json, toJson, serializing models, serial
|
||||
|
||||
## Introduction
|
||||
|
||||
<div class="api-stability alert alert--success">
|
||||
<Link to='/stability#stability-indexes'>__Stability: 2__</Link> - Stable
|
||||
</div>
|
||||
|
||||
When building APIs using TinyORM, you will often need to convert your models and relationships to vectors, maps, or JSON. TinyORM includes convenient methods for making these conversions, as well as controlling which attributes are included in the serialized representation of your models.
|
||||
|
||||
## Serializing Models & Collections {#serializing-models-and-collections}
|
||||
|
||||
Reference in New Issue
Block a user