Skip to content

TypeORM: Premier TypeScript/JavaScript Object-Relational Mapping (ORM) framework. Simplifies DB operations via an expressive API, ideal with Express. Leverages decorators for easy model, validation, relationship setup. Automates SQL queries, schema. Compatible, strong typing - the ORM choice.

sami12344/TypeORM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Logo

TypeORM

"TypeORM is a feature-rich Object-Relational Mapping (ORM) library for TypeScript and JavaScript. It simplifies database interactions by providing a seamless way to map TypeScript/JavaScript classes to database tables, enabling developers to work with databases using familiar programming paradigms. With support for various databases and advanced features like migrations, repositories, and custom queries, TypeORM streamlines the process of managing and querying data while maintaining strong typing and type safety."

• Introduction • Features • Installation • Usage • Configuration • Database Setup • Models • Repositories • Migrations • Seed Data • Queries • Advanced Tips • Contributing • Authors • License

Introduction

Welcome to the TypeORM README! If you're looking to supercharge your database interactions with the power of TypeScript and JavaScript, you're in the right place.

TypeORM is not just another ORM; it's a game-changer that bridges the gap between your application's code and your database, making database interactions a breeze. Whether you're a seasoned developer or just starting your coding journey, TypeORM empowers you to work with databases using an intuitive and developer-friendly approach.

Imagine writing database queries as easily as you write your application logic. With TypeORM, this becomes reality. You define your data structures as classes, and TypeORM takes care of translating these classes into tables, columns, and relationships in the database.

TypeORM is all about productivity and type safety. Say goodbye to manual SQL queries and tedious database management tasks. Focus on your application's features and let TypeORM handle the heavy lifting.

Key Features

  • Object-Relational Mapping: Seamlessly map your classes to database tables, turning database operations into simple method calls.
  • TypeScript and JavaScript: Write your code in the language you prefer, with full TypeScript support and compatibility with plain JavaScript.
  • Cross-Database Compatibility: TypeORM supports various databases, including MySQL, PostgreSQL, SQLite, and more.
  • Migrations Made Easy: Manage changes in your database schema over time with smooth migration support.
  • Repository Pattern: Use repository classes to perform CRUD operations and advanced queries in a structured manner.
  • CLI Tools: Leverage command-line tools for tasks like generating entities, migrations, and more.
  • Advanced Querying: Execute complex queries and leverage database features effortlessly.
  • Open Source Community: Join a vibrant community of developers contributing to and benefiting from TypeORM.

In this README, we'll explore how to get started with TypeORM, from installation and configuration to building models, performing queries, and optimizing your workflow. Whether you're building a small web app or a large-scale enterprise solution, TypeORM is your go-to companion for efficient, type-safe, and elegant database management.

Let's dive in and unleash the true potential of TypeORM in your projects!

Features

TypeORM offers a wealth of powerful features that elevate your database interactions to new heights. With a focus on simplicity, productivity, and maintainability, TypeORM equips developers with tools that streamline database management and make working with data an enjoyable experience.

Object-Relational Mapping (ORM)

TypeORM's core feature is its seamless Object-Relational Mapping (ORM) capabilities. Instead of writing raw SQL queries, you define your data structures using TypeScript or JavaScript classes. TypeORM then handles the translation of these classes into database tables, columns, and relationships. This approach bridges the gap between your application's code and your database schema, making database interactions as intuitive as working with regular objects.

TypeScript and JavaScript Support

TypeORM caters to developers across different language preferences. Whether you're a TypeScript aficionado or prefer the simplicity of JavaScript, TypeORM has you covered. Write your models, repositories, and queries in your language of choice, benefiting from strong typing, autocompletion, and modern language features.

Cross-Database Compatibility

Embrace flexibility with TypeORM's cross-database compatibility. With support for various databases, including but not limited to MySQL, PostgreSQL, SQLite, and Microsoft SQL Server, you can seamlessly switch between different databases without overhauling your application code.

Migrations Made Easy

Database schema changes are a natural part of software development. TypeORM simplifies this process with its comprehensive migration support. Generate, apply, and manage database migrations effortlessly, ensuring your database schema evolves gracefully over time.

Repository Pattern

TypeORM introduces the repository pattern, allowing you to encapsulate and organize your database operations within specialized repository classes. This pattern enhances code structure, improves reusability, and promotes a clean separation between data access and business logic.

CLI Tools

TypeORM's Command-Line Interface (CLI) tools empower you to perform various tasks with ease. Quickly generate entities, migrations, and other essential components using simple commands, speeding up your development workflow.

Advanced Querying

Unlock the potential of your database with advanced querying capabilities. Leverage TypeORM's query builder to construct complex SQL queries programmatically. Execute joins, aggregations, and subqueries without resorting to manual SQL writing.

Open Source Community

Join a thriving community of developers who contribute to and benefit from TypeORM's continuous growth. Share your expertise, learn from others, and shape the future of TypeORM.

TypeORM is more than a tool; it's a partner that empowers you to build scalable, maintainable, and efficient database-driven applications. From startups to enterprises, TypeORM's features adapt to your project's needs, boosting your development productivity and enhancing the quality of your codebase.

Installation

To get started with TypeORM in your project, follow these simple steps:

  1. Install TypeORM and Required Dependencies:

    Open your terminal and navigate to your project's directory. Then, install TypeORM and the database driver you intend to use. For instance, if you're using PostgreSQL:

    npm install typeorm pg
    # OR
    yarn add typeorm pg

    Replace pg with the appropriate database driver package if you're using a different database.

  2. Configuration:

    Create an ormconfig.json file in the root of your project. This is where you'll configure your database connection settings, entities, and more. Refer to TypeORM Configuration for guidance.

  3. Create Your First Entity:

    Define your first entity by creating a TypeScript class. An entity represents a table in your database. You can use decorators to specify columns, relationships, and more. Here's a simple example:

    import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'
    
    @Entity()
    class User {
      @PrimaryGeneratedColumn()
      id: number
    
      @Column()
      username: string
    
      // ... other columns and relationships
    }
  4. Start Using TypeORM:

    Now you're ready to use TypeORM! Import the required functions from TypeORM to create repositories, perform database operations, and manage your entities.

That's it! You're set up to work with TypeORM in your project. For more advanced usage and configuration options, check out the TypeORM documentation.

Feel free to adapt and modify this installation section according to your project's requirements and preferred level of detail.

Usage

TypeORM makes working with databases a breeze, providing you with an intuitive and developer-friendly API. In this section, we'll cover some common usage scenarios to help you get started.

Creating a New Entity

To create a new entity, define a TypeScript class with the appropriate decorators. Decorators like @Entity(), @Column(), and others help you define the structure of your database tables and columns. Here's an example:

import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'

@Entity()
class User {
  @PrimaryGeneratedColumn()
  id: number

  @Column()
  username: string

  // ... other columns and relationships
}

Creating a Repository

Repositories are used to interact with your entities and perform database operations. To create a repository, you'll use the getRepository function provided by TypeORM:

import { getRepository } from 'typeorm'

const userRepository = getRepository(User)

Inserting Data

Inserting data into the database is straightforward. Use the repository's save method to create new records:

const newUser = userRepository.create({ username: 'example' })
await userRepository.save(newUser)

Querying Data

TypeORM provides a rich query builder that lets you construct complex queries in a programmatic way. Here's a simple example of querying for all users with a specific username:

const usersWithUsername = await userRepository
  .createQueryBuilder('user')
  .where('user.username = :username', { username: 'example' })
  .getMany()

Updating Data

Updating data is as simple as fetching a record, modifying it, and saving it back:

const userToUpdate = await userRepository.findOne({ id: 1 })
userToUpdate.username = 'new-username'
await userRepository.save(userToUpdate)

Deleting Data

Deleting records is also straightforward:

await userRepository.delete({ id: 1 })

These are just a few basic examples of how you can use TypeORM in your project. Dive into the TypeORM documentation for more advanced features, such as relationships, migrations, transactions, and custom queries. TypeORM's intuitive API will help you handle complex database interactions with ease.

Configuration

Configuring TypeORM is an essential step to connect your application with your chosen database. The configuration is typically managed through the ormconfig.json file in the root of your project. In this section, we'll guide you through the process of setting up the configuration.

Creating the Configuration File

To create the configuration file, follow these steps:

  1. Create a new file named ormconfig.json in your project's root directory.

  2. Populate the file with the required configuration options. Here's a basic example:

{
  "type": "postgres",
  "host": "localhost",
  "port": 5432,
  "username": "your-username",
  "password": "your-password",
  "database": "your-database",
  "entities": ["dist/entities/*.js"],
  "synchronize": true
}
  • "type": Specify the type of database you're using (e.g., "postgres", "mysql", "sqlite").

  • "host": The hostname or IP address of the database server.

  • "port": The port number the database server listens on.

  • "username" and "password": Your database credentials.

  • "database": The name of the database you're connecting to.

  • "entities": An array of paths to your entity files. Use this to specify the location of your entity classes.

  • "synchronize": Set to true during development to auto-create or update the database schema based on your entity definitions. Disable this in production.

Advanced Configuration

The basic configuration outlined above should work for most projects. However, TypeORM provides a wealth of additional configuration options to fine-tune your setup. These include:

  • Connection pooling
  • Logging
  • Migrations
  • Cache
  • Subscribers
  • ...and more

Refer to the TypeORM Configuration documentation for an in-depth explanation of each option and advanced configurations.

Remember to securely manage sensitive information such as database credentials. You can use environment variables, configuration files outside of version control, or other secure methods.

Once your configuration is set up, you're ready to start using TypeORM to interact with your database. Enjoy the power and simplicity of TypeORM's database management capabilities!

Database Setup

Before you start working with your application's data using TypeORM, you'll need to set up the database. This involves creating the necessary database, defining its schema, and configuring your TypeORM entities to match.

1. Create the Database

Depending on the database type you've chosen (e.g., PostgreSQL, MySQL, SQLite), follow the appropriate steps to create a new database. You can use the command-line tools provided by your chosen database management system or a graphical interface.

2. Configuration Update

Make sure your ormconfig.json (or equivalent configuration file) contains accurate database connection details, including the database name, host, port, username, and password.

Here's a reminder of what your ormconfig.json might look like:

{
  "type": "postgres",
  "host": "localhost",
  "port": 5432,
  "username": "your-username",
  "password": "your-password",
  "database": "your-database",
  "entities": ["dist/entities/*.js"],
  "synchronize": true
}

3. Entity Definitions

Your entities define the structure of your database tables and their relationships. Make sure your entity classes are defined according to your database schema.

For example, if you have a User entity:

import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'

@Entity()
class User {
  @PrimaryGeneratedColumn()
  id: number

  @Column()
  username: string

  // ... other columns and relationships
}

Ensure your entities' properties match the columns in your database tables.

4. Synchronization

During development, you can enable the "synchronize": true option in your configuration. This automatically creates or updates the database schema based on your entity definitions whenever your application starts.

{
  // ... other configuration options
  "synchronize": true
}

Note: Be cautious with this setting in production, as it can lead to data loss if not used carefully. In production, consider using migrations to manage schema changes.

5. Run Your Application

With your database set up, configurations in place, and entity definitions ready, you're now ready to run your application. TypeORM will handle the connections and interactions with your database according to your entity definitions.

Remember that while TypeORM streamlines the process, it's essential to have a solid understanding of your database schema and design to ensure your application's data integrity and performance.

Models

Models in TypeORM are represented by TypeScript classes that define the structure of your database tables. Each model maps to a table, and its properties represent columns. Models can also include relationships with other models.

Creating a Model

To create a model, define a TypeScript class and decorate it with the appropriate TypeORM decorators. For example, let's create a simple Product model:

import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'

@Entity()
class Product {
  @PrimaryGeneratedColumn()
  id: number

  @Column()
  name: string

  @Column()
  price: number
}

In this example, the @Entity() decorator marks the class as an entity, while @PrimaryGeneratedColumn() and @Column() decorators define the primary key and columns.

Relationships

TypeORM makes it easy to define relationships between models. Consider a scenario where a Product belongs to a Category:

import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'
import { Category } from './Category' // Import the related model

@Entity()
class Product {
  @PrimaryGeneratedColumn()
  id: number

  @Column()
  name: string

  @Column()
  price: number

  @ManyToOne(() => Category, (category) => category.products)
  category: Category
}

In this example, the @ManyToOne() decorator establishes a many-to-one relationship between Product and Category entities.

Inheritance

TypeORM also supports inheritance, allowing you to create base classes and extend them for specific models. Here's a simplified example:

import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'

@Entity()
class BaseEntity {
  @PrimaryGeneratedColumn()
  id: number

  // ... common columns or properties
}

@Entity()
class User extends BaseEntity {
  @Column()
  username: string

  // ... other user-specific columns
}

In this case, User extends BaseEntity, inheriting its properties.

Advanced Options

Models offer a plethora of advanced options and decorators for defining indexes, constraints, default values, and more. Explore the TypeORM Entity Options documentation for a comprehensive list.

With models, you define the blueprint of your database tables and their relationships. TypeORM's intuitive syntax and decorators enable you to effortlessly map your application's data structures to the database schema.

Repositories

Repositories in TypeORM provide a structured and efficient way to interact with your database entities. They encapsulate database operations and allow you to perform Create, Read, Update, and Delete (CRUD) actions as well as more advanced queries.

Creating a Repository

To create a repository, use the getRepository function provided by TypeORM. For instance, if you have a User entity:

import { getRepository } from 'typeorm'

const userRepository = getRepository(User)

Basic CRUD Operations

Repositories make basic CRUD operations a breeze. Here are some examples:

// Creating a new user
const newUser = userRepository.create({ username: 'example' })
await userRepository.save(newUser)

// Finding users
const users = await userRepository.find()

// Updating a user
const userToUpdate = await userRepository.findOne({ id: 1 })
userToUpdate.username = 'new-username'
await userRepository.save(userToUpdate)

// Deleting a user
await userRepository.delete({ id: 1 })

Custom Queries

TypeORM's query builder empowers you to create complex queries programmatically. Here's an example of finding users with a specific role:

const usersWithRole = await userRepository
  .createQueryBuilder('user')
  .where('user.role = :role', { role: 'admin' })
  .getMany()

Transactions

Repositories support transactions, ensuring that a series of operations either all succeed or none do. Here's a basic example:

await getManager().transaction(async (transactionalEntityManager) => {
  await transactionalEntityManager.save(User, newUser)
  await transactionalEntityManager.update(User, 2, {
    username: 'updated-username',
  })
})

More Repository Methods

TypeORM repositories offer a variety of methods for querying, updating, and deleting data. Explore the TypeORM Repository API documentation for a comprehensive list of available methods.

Repositories streamline your database interactions, providing a structured approach to managing your application's data. Whether you're performing basic CRUD operations or crafting intricate queries, repositories are your tool of choice for efficient database access.

Certainly, here's a "Migrations" section for your TypeORM README:

Migrations

Database schema changes are inevitable as your application evolves. TypeORM's migration feature allows you to manage these changes efficiently, ensuring that your database structure aligns with your entity definitions.

Creating Migrations

To create a migration, use the TypeORM CLI or its API. The CLI provides a simple way to generate migrations based on changes in your entity files:

npx typeorm migration:create -n MyMigrationName

This command generates a new migration file with the provided name.

Applying Migrations

Once you've created a migration, you can apply it to your database:

npx typeorm migration:run

This command runs all pending migrations and updates your database schema.

Reverting Migrations

If needed, you can revert the last applied migration:

npx typeorm migration:revert

This command undoes the last applied migration.

Managing Multiple Environments

TypeORM migrations can also handle multiple environments, such as development, testing, and production. Use the --connection option to specify a different connection from your ormconfig.json:

npx typeorm migration:run --connection test

Seed Data and Migrations

Migrations can also include seed data for your database. Add seed data using the insert method within your migration's up method:

export class SeedData1597622074505 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(/* SQL queries for inserting seed data */)
  }

  // ... other methods
}

Migrations API

If you prefer programmatic control over migrations, you can use TypeORM's API to create, run, and manage migrations. Refer to the TypeORM Migrations API documentation for detailed guidance.

Migrations are a critical tool for maintaining your database's integrity as your application evolves. TypeORM's migration feature simplifies the process, ensuring that your database schema changes are handled seamlessly.

Seed Data

Seed data plays a crucial role in populating your database with initial records for development or testing purposes. TypeORM allows you to incorporate seed data alongside your migrations to ensure your database starts with relevant data.

Adding Seed Data to Migrations

To include seed data within your migrations, follow these steps:

  1. Create a Migration: Generate a new migration using the TypeORM CLI or API. This migration will handle both schema changes and seed data insertion.

  2. Populate Seed Data: Inside the migration's up method, use query runners to insert seed data into your tables:

export class SeedData1628198266520 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    // Insert seed data into the 'users' table
    await queryRunner.query(`
      INSERT INTO users (username, email) VALUES ('user1', 'user1@example.com');
      INSERT INTO users (username, email) VALUES ('user2', 'user2@example.com');
      -- ... more seed data
    `)
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    // Revert the seed data changes if needed
  }
}
  1. Run the Migration: Run the migration using the TypeORM CLI to apply the schema changes and insert the seed data:
npx typeorm migration:run

Using a Seeder Script

Another approach is to create a separate seeder script that populates the database. This approach can be useful when working with larger datasets or when you need more control over the seeding process:

  1. Create a Seeder Script: In a designated script (e.g., seed.ts), use your repositories to insert seed data:
import { createConnection } from 'typeorm'
import { User } from './entities/User' // Import your entity classes

async function seed() {
  const connection = await createConnection()

  const userRepo = connection.getRepository(User)

  const newUser = userRepo.create({
    username: 'seeded-user',
    email: 'seeded@example.com',
  })
  await userRepo.save(newUser)

  // ... insert more seed data
}

seed()
  .then(() => console.log('Seeding complete!'))
  .catch((error) => console.error('Seeding error:', error))
  1. Run the Seeder Script: Execute the seeder script to populate the database:
ts-node seed.ts

Best Practices

  • Keep your seed data small and focused on essential records for development and testing.
  • Update your seed data as your application's requirements evolve.
  • Use migrations and seeders together to ensure a consistent database state.

Seed data ensures that your database starts with relevant records, making it easier to develop and test your application. Choose the approach that best suits your needs and maintain your seed data alongside your project's evolution.

Queries

TypeORM's powerful query builder allows you to construct complex SQL queries in a programmatic, type-safe manner. This section will introduce you to some essential query-building techniques.

Basic Querying

Here's how you can use the query builder to fetch data from the database:

import { getRepository } from 'typeorm'

const userRepository = getRepository(User)

const users = await userRepository
  .createQueryBuilder('user')
  .where('user.age > :age', { age: 25 })
  .orderBy('user.username', 'ASC')
  .getMany()

In this example, we retrieve users older than 25 and order them by username.

Joining Tables

TypeORM makes joining tables intuitive:

const usersWithRoles = await userRepository
  .createQueryBuilder('user')
  .leftJoinAndSelect('user.roles', 'role')
  .getMany()

This query fetches users along with their associated roles.

Aggregations

You can perform aggregations like counting, summing, or averaging:

const userCount = await userRepository
  .createQueryBuilder('user')
  .select('COUNT(user.id)', 'count')
  .getRawOne()

This query returns the count of users.

Subqueries

Subqueries allow you to nest queries within queries:

const highSpendingUsers = await userRepository
  .createQueryBuilder('user')
  .where(`user.id IN (${subQuery.getQuery()})`)
  .setParameter('maxSpending', 1000)
  .getMany()

Here, subQuery is a separate query that fetches user IDs with high spending.

Transactions

Wrap multiple queries in a transaction for atomicity:

await getManager().transaction(async (transactionalEntityManager) => {
  await transactionalEntityManager.save(User, newUser)
  await transactionalEntityManager.delete(User, { id: 2 })
})

More Query Building

These are just a few examples of what you can achieve with TypeORM's query builder. Explore the TypeORM Query Builder documentation for more methods and advanced techniques.

TypeORM's query builder gives you the tools to construct sophisticated queries while maintaining strong typing and code readability. Whether you need simple data retrieval or complex aggregations, the query builder has you covered.

Advanced Tips

As you become more comfortable with TypeORM, consider these advanced tips to enhance your experience and optimize your database interactions.

1. Use Transactions Wisely

Transactions ensure the atomicity of a series of database operations. Wrap related operations in a transaction to guarantee that they all succeed or fail together:

await getManager().transaction(async (transactionalEntityManager) => {
  await transactionalEntityManager.save(User, newUser)
  await transactionalEntityManager.delete(User, { id: 2 })
})

2. Utilize Caching

TypeORM supports caching, reducing the need to hit the database frequently. Configure caching for frequently accessed data to improve performance:

await userRepository.find({
  cache: true,
  cacheId: 'my-cache-key',
  cacheTime: 60000, // Cache expiration time in milliseconds
})

3. Optimize Queries

Leverage TypeORM's query builder to construct efficient queries. Use indexing, limit the selected columns, and avoid excessive joins to improve query performance.

4. Handle Large Datasets

For handling large datasets, consider pagination and filtering. Use the take and skip methods to implement pagination:

const pageSize = 10
const pageNumber = 2
const users = await userRepository.find({
  take: pageSize,
  skip: pageSize * (pageNumber - 1),
})

5. Migrations and Continuous Integration

In a continuous integration environment, consider running migrations automatically before running tests to ensure that the database schema is up to date:

npx typeorm migration:run
npm test

6. Utilize Migration Scripts

For tasks beyond simple schema changes, create migration scripts that modify data or perform complex operations during migrations:

export class DataMigration1597622074505 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      'UPDATE users SET active = true WHERE lastLogin > NOW() - INTERVAL 6 MONTH'
    )
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    // Revert the data changes if needed
  }
}

7. Contribution and Feedback

TypeORM is an open-source project with an active community. Contribute to the project, report issues, and provide feedback to help shape its future.

Remember that while these advanced tips can enhance your TypeORM experience, it's essential to evaluate your application's specific needs and context before implementing them.

Stay curious and keep exploring TypeORM's capabilities to build robust and performant database-driven applications!

Contributing

TypeORM is an open-source project, and contributions from the community are highly valued and appreciated. Whether you're fixing a bug, adding a new feature, or improving documentation, your efforts can make a significant impact.

Getting Started

If you're new to contributing to open-source projects or TypeORM, here's how you can get started:

  1. Familiarize Yourself: Take some time to understand the project's structure, coding conventions, and guidelines by reading the TypeORM GitHub repository.

  2. Select an Issue: Check the GitHub Issues to find issues labeled "good first issue" or those that align with your expertise and interests.

  3. Fork the Repository: Fork the official TypeORM repository to your GitHub account.

  4. Clone Your Fork: Clone your forked repository to your local development environment.

  5. Install Dependencies: Install the project dependencies by running npm install.

  6. Make Changes: Create a new branch for your changes and start making improvements.

  7. Test Your Changes: Run the tests to ensure your changes haven't introduced new issues.

  8. Commit and Push: Commit your changes and push them to your fork.

  9. Create a Pull Request: Open a pull request from your fork to the main TypeORM repository. Provide a detailed description of your changes and why they're valuable.

Guidelines

When contributing to TypeORM, keep these guidelines in mind:

  • Follow the Code of Conduct to maintain a respectful and inclusive environment.

  • Follow the existing coding style, including indentation, naming conventions, and formatting.

  • Write clear and concise commit messages that describe the purpose of your changes.

  • Test your changes thoroughly to ensure they don't introduce regressions.

  • Document your changes, including adding or updating relevant documentation.

  • Be responsive to feedback and engage in discussions about your pull request.

Join the Community

Contributing to TypeORM means becoming part of an active and collaborative community. Connect with other contributors, maintainers, and users through GitHub discussions, forums, and social media channels.

Your contributions can help improve TypeORM for everyone, making it a more robust and feature-rich tool for database interactions.

Thank you for considering contributing to TypeORM. Your efforts are instrumental in shaping the project's future and making it even more valuable to the development community!

Authors

TypeORM is a collaborative effort made possible by contributions from individuals around the world. Here are some of the authors who have played a significant role in developing and maintaining the project:

  • Sami Islam - Lead Developer - GitHub

A special thank you to all the contributors who have helped shape TypeORM into the powerful tool it is today. If you've contributed to TypeORM and would like to be recognized, please feel free to add your name and contribution details here.

For the most up-to-date list of contributors, refer to the GitHub Contributors page.

We deeply appreciate the time and effort put into enhancing TypeORM and making it better with each release!

License

License: MIT

This project is licensed under the MIT License. See the LICENSE file for details.


MIT License

SPDX-License-Identifier: MIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


By using, contributing to, or distributing this software, you agree to abide by the terms of the MIT License.

About

TypeORM: Premier TypeScript/JavaScript Object-Relational Mapping (ORM) framework. Simplifies DB operations via an expressive API, ideal with Express. Leverages decorators for easy model, validation, relationship setup. Automates SQL queries, schema. Compatible, strong typing - the ORM choice.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published