Skip to content

Files

Latest commit

 

History

History

orm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 7, 2025
May 7, 2025
May 6, 2025
May 7, 2025
Mar 18, 2025
Apr 26, 2025
May 7, 2025
Apr 25, 2025
May 7, 2025
May 7, 2025

mORMot REST Object-Relational-Mapping ORM Units

Folder Content

This folder hosts the RESTful ORM high-level features of the mORMot Open Source framework, version 2.

ORM/ODM Features

mORMot implements a simple and very efficient Object-Relational-Mapping:

  • The parent TOrm class give access to ORM methods at object level;
  • IRestOrm IRestOrmServer IRestOrmClient interfaces can be used in business code for abstract and persistent-agnostic data access;
  • UTF-8 and JSON are used from the ground up, to make our ORM easy to consume in a REST approach, as defined in the /src/rest folder;
  • It can leverage SQLite3 as its kernel, to access several data sources over virtual tables;
  • A high-performance in-memory engine, using JSON or binary on disk, can be used instead of SQLite3;
  • Switch to a NoSQL database like MongoDB is possible, transforming our ORM to an ODM - aka Object-Document-Mapping.

Units Presentation

mormot.orm.base

Low-Level Basic Types and Definitions for our RESTful ORM

  • Shared ORM/JSON Fields and Values Definitions
  • ORM Ready UTF-8 Comparison Functions
  • TOrmWriter Class for TOrm Serialization
  • TOrmPropInfo ORM / RTTI Classes
  • Abstract TOrmTableAbstract Parent Class
  • TOrmTableRowVariant Custom Variant Type
  • TOrmLocks and TOrmCacheTable Basic Structures

mormot.orm.core

Main Shared Types and Definitions for our RESTful ORM

  • ORM Specific TOrmPropInfoRtti Classes
  • IRestOrm IRestOrmServer IRestOrmClient Definitions
  • TOrm Definition
  • RecordRef Wrapper Definition
  • TOrmTable TOrmTableJson Definitions
  • TOrmMany Definition
  • TOrmVirtual Definitions
  • TOrmProperties Definitions
  • TOrmModel TOrmModelProperties Definitions
  • TOrmCache Definition
  • TRestBatch TRestBatchLocked Definitions
  • TSynValidateRest TSynValidateUniqueField Definitions
  • TOrmAccessRights Definition
  • TOrm High-Level Parents

This unit is not depending from mormot.rest.core so can be used as a pure ORM layer for your projects.

The IRestOrm interface is the main SOLID entry point of all ORM process.

mormot.orm.rest

IRestOrm Implementation as used by TRest

  • Some definitions Used by TRestOrm Implementation
  • TRestOrm Parent Class for abstract REST client/server

mormot.orm.client

Client-Side Object-Relational-Mapping (ORM) Process

  • TRestOrmClient Abstract Client
  • TRestOrmClientURI REST Client from URI

mormot.orm.server

Server-Side Object-Relational-Mapping (ORM) Process

  • TRestOrmServer Abstract Server
  • TRestOrmServerBatchSend for TRestBach Server-Side Process

mormot.orm.storage

Server-Side Storage Process using JSON or Binary Persistence

  • Virtual Table ORM Support
  • TRestStorage Abstract Class for ORM/REST Storage
  • TRestStorageInMemory as Stand-Alone JSON/Binary Storage
  • TOrmVirtualTableJSON/TOrmVirtualTableBinary Virtual Tables
  • TRestStorageRemote for CRUD Redirection
  • TRestStorageShard as Abstract Sharded Storage Engine

mormot.orm.sql

ORM SQL Database Access using mormot.db.sql units

  • TRestStorageExternal for ORM/REST Storage over SQL
  • TOrmVirtualTableExternal for External SQL Virtual Tables
  • External SQL Database Engines Registration Functions

mormot.orm.sqlite3

ORM SQLite3 Database Access using mormot.db.raw.sqlite3 unit

  • TOrmTableDB as Efficient ORM-Aware TOrmTable
  • TOrmVirtualTableModuleServerDB for SQLite3 Virtual Tables
  • TRestStorageShardDB for REST Storage Sharded Over SQLite3 Files
  • TRestOrmServerDB REST Server ORM Engine over SQLite3
  • TRestOrmClientDB REST Client ORM Engine over SQLite3

mormot.orm.mongodb

ORM/ODM MongoDB Database Access using mormot.db.nosql.mongodb unit

  • TRestStorageMongoDB for REST Storage Over MongoDB
  • High-Level Functions to Initialize MongoDB ORM