Skip to content

szalaybalazs/orm

Repository files navigation


PostgresORM

Advanced PostgreSQL ORM and Query Builder.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

ORM NAME

A PostgreSQL ORM created to scaffold large-scale and advanced databases.

Currently only supports basic ORM functionalities, planning on added advanced features, such as multi-tenant support and trigger functions.

I am documenting the whole process of creating the package on twitter.

(back to top)

Getting Started

Installation

Coming Soon – Not yet production ready

(back to top)

Usage

List of all the currently supported commands.

# Initialise a new, empty configuration
init

# Generate new migration
migration:generate <migration name>

# Create empty migration
migration:create <migration name>

# Run all available migrations
migration:run

# Revert database to the selected migration
migration:revert

# Create a new, empty entity
entity:create

# Generated the types for the currently synced entities
types:generate

Examples

The repo contains an example folder - feel free to clone and play around with it; as always, suggetions are more than welcome.

(back to top)

Roadmap

  • ORM
    • CLI
      • Create new, empty entity
      • Create new, empty migration
      • Generate migration based on entity changes
      • Run all available migrations
      • Revert to a specific migration
      • Handle other object depend on error when trying to replace a column which is used by a view
      • Drop migrations
        • Drop last migration
    • Incremental migrations
    • Keywords in default
    • Indices
    • Autogenerate table names (pluralize)
    • Handle primary keys
    • Orm configs
      • js/ts support
      • json support
      • xml support
      • yml support
      • .env support
    • Plugin manager
    • Enum support
    • Foreign key support
      • Relation support
    • View support
      • Add 'with check' option
    • Function support
    • Trigger support
      • Add onInsert.set
      • Add onUpdate.set
      • Add onDelete.set
      • Add beforeInsert procedure SQL code
      • Add beforeUpdate procedure SQL code
      • Add beforeDelete procedure SQL code
      • Add preventDefault logic
      • Add conditional logic
    • GIS Support
    • Convert codebase to classes for easier maintenance
    • Handle naming conventions
    • Add warnings to operations with potential data loss
    • Add pull command
  • Query Builder
  • Graphql Types

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Balazs Szalay - @szalayme - balazs@szalay.me

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published