ORM
  • Introduction
  • Basics of Usage
    • Connecting to the Database
    • Creating a Model
    • Simple Queries
  • Configuration
  • Core Features
    • Models
    • CRUD Operations (Create, Read, Update, Delete): examples
    • Relationships
    • Transactions
  • Advanced Usage
    • Data Definition Language
    • Indexes
    • Triggers
    • Caching
  • Examples and templates
  • Security
    • Query parameterization and protection against SQL injections
    • Logging
    • Monitoring
    • Sanitization
  • ORM-CLI
    • Installing
    • Commands and usage
  • System architecture and implementation
    • Support of various databases
      • Implementation using a pattern strategy
      • Implementation using generics
      • Implementation using metaprogramming
    • Decorators
    • Migrations
      • Assignment of id in Tables and Columns
      • Assigning IDs to indexes and triggers
      • Working with migrations in ORM-CLI
        • Implementation of a pattern command for migration
    • QueryBuilder
    • Caching
    • File structure
  • API
    • Decorators
      • Column
      • ComputedColumn
      • Index
      • ForeignKey
      • PrimaryGeneratedColumn
      • Relations
      • Table
      • Trigger
      • Types decorators
        • Integer
        • Numeric
        • Float
        • Boolean
        • String
    • DDL
    • QueryBuilder
    • Additional API
Powered by GitBook
On this page

Introduction

ORM system of Myroslav Shymkiv

NextBasics of Usage

Last updated 6 months ago

Welcome to the documentation for and . My system is a powerful and flexible tool for working with databases in a NodeJS environment, allowing developers to effectively interact with relational databases such as PostgreSQL and MySQL. The ORM is designed to simplify data handling, ensure security, and enhance performance.

Core Functionality

  1. Database Access Abstraction ORM allows developers to interact with the database at the object level instead of working with relational tables. This means you can manipulate data using objects and object-oriented programming (OOP) methods, without the need to write SQL queries manually.

  2. Object-to-Database Record Transformation and Vice Versa My ORM system automatically translates between application objects and database table records. This includes:

    • Saving objects to the database.

    • Updating existing records.

    • Deleting records.

    • Loading data from the database and converting it to objects.

  3. Automatic Schema Creation and Maintenance Some ORM systems, including mine, can automatically generate the database schema based on defined object models. This covers the creation of tables, indexes, table relationships, and other database structure elements.

  4. Database Migrations My ORM system provides tools for modifying the database structure, such as creating, updating, and deleting tables, fields, and more, through a migration system.

  5. Support for Multiple Databases ORM allows working with various relational databases without needing to change application code, providing flexibility and scalability.

  6. Object Relationship Management My solution offers mechanisms for managing relationships (associations) between objects, such as "one-to-one," "one-to-many," and "many-to-many." This enables convenient handling of related data without the need to manually write complex SQL queries.

  7. Integrity Constraints Support ORM automatically enforces data integrity constraints such as uniqueness, NOT NULL, and foreign keys, contributing to maintaining data consistency in the database.

  8. Protection Against SQL Injection My ORM includes mechanisms for automatic SQL query handling, helping to protect the application from SQL injection. This is achieved through the use of parameterized queries and proper data escaping.

  9. Data Caching My ORM system provides capabilities for caching objects, which can significantly improve application performance by reducing the number of database queries.

  10. Transactional Support My ORM manages transactions, ensuring atomicity of operations and data consistency.

Documentation Goals

This documentation is created to help you:

  • Showcase my project in full.

  • Understand the core concepts and features of the system.

  • Get started with ORM quickly and easily.

  • Utilize all system capabilities for effective database handling.

  • Resolve potential issues and gain maximum benefit from using my ORM system.

  • Describe how this system was created, its architecture, and the principles behind its functionality.

  • Demonstrate my architectural skills.

  • Contribute to the IT community.

Documentation Structure

I hope this documentation will be useful to you and help you make the most effective use of the ORM. If you have any questions or issues, feel free to contact our support or developers.

(, , )

(, , , )

(, , , )

(, , , )

(, )

@myroslavshymon/orm (ORM)
ORM-CLI
Introduction
Basics of Usage
Connecting to the Database
Creating a Model
Simple Queries
Configuration
Core Features
Models
CRUD Operations
Relationships
Transactions
Advanced Usage
Data Definition Language
Indexes
Triggers
Caching
Examples and templates
Security
Query parameterization and SQL injections
Logging
Monitoring
Sanitization
ORM-CLI
Installing
Commands and usage
System architecture and implementation
Support of various databases
Implementation using a pattern strategy
Implementation using generics
Implementation using metaprogramming
Decorators
Migrations
Assignment of id in Tables and Columns
Assigning IDs to indexes and triggers
Working with migrations in ORM-CLI
Implementation of a pattern command for migration
QueryBuilder
Caching
File structure
API
Decorators
DDL
QueryBuilder
Additional API