Jaymon / prom

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

You should be able to add fields by defining classes? #122

Closed Jaymon closed 3 years ago

Jaymon commented 3 years ago

so something like this:

class Foo(Orm):
  class bar(Field):
     # add custom field code and override methods
     type = int
     def igetter(self, v): return int(v)

I think the biggest change would be the schema compiler would need to see if it is just a subclass of Field and then instantiate it.