Coder Social home page Coder Social logo

orm's Introduction

Learning Masonite

Masonite strives to have extremely comprehensive documentation. All documentation can be Found Here and would be wise to go through the tutorials there. If you find any discrepencies or anything that doesn't make sense, be sure to comment directly on the documentation to start a discussion!

Also be sure to join the Slack channel!

Setting up

To setup the package to get your package up and running, you should first take a look at setup.py and make any packages specific changes there. These include the classifiers and package name.

Then you should create a virtual environment and activate it

$ python3 -m venv venv
$ source venv/bin/activate

Then install from the requirements file

$ pip install -r requirements.txt

This will install Masonite and a few development related packages like pytest.

Finally you can run the tests and start building your application.

$ python -m pytest

Phase 1

Versions 0.1-0.5

Project Deadline: November 1 2020. This should give enough time to incorporate the new ORM into Masonite's major release at the time.

Phase 1 will involve getting the foundation setup for this project. Making sure we can include all the basic use cases and relationships as well as a 100% full documentation. By the end of Phase 1, this ORM should be able to handle the 90% of use cases of a project. Phase 2 will complete the more uncommon or edge cases.

Short Term Tasks

  • Finish basic grammar for:
    • [-] MySQL
    • MSSQL
    • Postgres
    • SQLite
  • Get the query builder to use the grammar
  • Refactor to use %s symbols so we can use avoid sql injection attacks

TODO

  • MySQL

    • Grammar
      • SELECT
        • Where
        • Or Where
      • UPDATE
      • INSERT
      • DELETE
      • ALTER
      • Subselects
        • on wheres where age > (SELECT ..)
        • Exists
      • Joining
    • Connection
    • Schema
      • SQL Injection
      • Needs type mappings and aggregates
      • Alter query AFTER keyword (for adding column after another column)
      • Constraints
        • Primary Keys
        • Unique
    • Tests
  • MSSQL

    • [-] Grammar
      • SELECT
      • UPDATE
      • INSERT
      • DELETE
      • ALTER
      • Joining
    • Connection
    • Schema
      • SQL Injection
      • Needs type mappings and aggregates
      • Constraints
        • Primary Keys
        • Unique
    • [-] Tests
  • Postgres

    • Grammar
      • SELECT
      • UPDATE
      • INSERT
      • DELETE
      • ALTER
      • Joining
    • Connection
    • Schema
      • SQL Injection
      • Needs type mappings and aggregates
      • Constraints
        • Primary Keys
        • Unique
    • Full Tests
  • SQLite

    • Grammar
      • SELECT
      • UPDATE
      • INSERT
      • DELETE
      • ALTER
      • Joining
    • Connection
    • Schema
      • Needs type mappings and aggregates
      • Constraints
        • Primary Keys
        • Unique
    • SQL Injection
    • Full Tests
  • Create Schema Builder class (just a wrapper around create and alter queries)

  • Relationships

  • [in progress] Add indexes to schema

  • Eager Loading

    • N + 1 Problem
  • Make new collection class

  • Make Column classes to better interact with building data

  • Fully document every part of the project. Will need to first get a basic working project and then start documenting everything. Then start opening pull requests and documenting as we add new features. Similiar to the way Masonite has good documentation.

Phase 2

Versions 0.5 - 0.9

Phase 2 will involve further refactoring. By this phase, all the documentation should be done for the above phase.

  • Where Has queries

Phase 3

Versions 1.0+

This phase will be responsible for adding additional quality of life features and overall improvements to the ORM. These include additional options and additional wrapper methods

orm's People

Contributors

corentinalcoy avatar josephmancuso avatar mandarvaze avatar marlysson avatar vaibhavmule avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.