Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

Field inline definitions should be able to set required #127

Closed Jaymon closed 3 years ago

Jaymon commented 3 years ago

Turns out, I don't like this syntax:

class Foo(Orm):
    class bar(Field):
        type = int
        options = {"required": True}

And I should be able to do:

class Foo(Orm):
    class bar(Field):
        type = int
        required = True

Any named arguments in __init__ should be top level properties.

Jaymon commented 3 years ago

At some point between April 29 and June 25, 2021 this got addressed