Mandarine.TS
Latest
Latest
  • Mandarine.TS
  • Getting started
    • Installing Deno Runtime
    • Setting up Environment
    • Quick Example
  • Concepts
  • Mandarine Project Structure
  • Mandarine CLI
    • CLI Reference
      • mandarine new
      • mandarine generate
      • mandarine run
  • Mandarine Core
    • Core Initialization
    • Mandarine.json
    • Dot env file
    • Properties
      • The @Value Decorator
    • Components
      • Controller
      • Middleware
      • Repository
      • Component
      • Service
      • Configuration
      • Manual Component
    • Dependency Injection
      • Accessing DI container
    • Resource Handlers
      • Resource Handler Registry
      • Resource Handler
      • Resource Resolver
  • Mandarine MVC
    • Web MVC
    • Controllers
      • Routes
        • Parameterized Routes
      • HTTP Handlers
      • @ResponseStatus
    • Custom Middleware
    • Session Middleware
    • CORS Middleware
    • Template Engine
      • @Render Decorator
      • Accessing data from template
    • Launching web-app
    • Serving Static Content
    • Multipart Form Data
  • Mandarine Security
    • Sessions
  • Mandarine Data
    • ORM
      • Data source
      • Models
      • Repositories
        • Interacting with data
        • Updating data
    • Mandarine Query Language
  • Resources
    • Changelog
  • Plugins
    • Optional
    • Promise Repeater
Powered by GitBook
On this page
  • Concepts
  • Mandarine data sources
  • Dialects

Was this helpful?

  1. Mandarine Data

ORM

PreviousSessionsNextData source

Last updated 4 years ago

Was this helpful?

An ORM is a system to manipulate data from a database programatically. There are many ORMs that you can adapt and use in Mandarine, although, Mandarine has its own built-in ORM framework that gives you a unique experience because of Mandarine Query Language (MQL).

Concepts

  • Models / Entities

    • Classes that represent a table in your database, this class has columns (properties) and it will be used for your database to interact with your code and vice-versa.

  • Repositories

    • An abstract class that contains your queries as well as predefined queries such as save, findAll, deleteAll, countAll

    • Repositories can contain custom queries or MQL queries.

    • Repositories are Mandarine Components, but they are only used for database interaction purposes which means you they cannot receive injections as described .

  • Proxy Method

    • A proxy method is a hidden processor for one or more of your methods.

    • Mandarine uses a proxy method to write & execute your database queries in order to avoid writing this kind of code on your application's layer.

    • Proxy methods are implemented behind mandarine repositories.

Mandarine data sources

Mandarine's built-in ORM framework only supports one native data source from your configuration's file. The ability to use two or more data sources and integrate them with your mandarine-powered application is not expected in the upcoming releases.

You can create your own services & processors for your database operations by using .

Dialects

Currently, Mandarine's built-in ORM only supports:

  • PostgreSQL

Note that support for MySQL is expected to be added in upcoming weeks .

here
Mandarine components
See enum here
(See here)