nobrin / macaron

A simple O/R mapper for SQLite
http://nobrin.github.com/macaron/
MIT License
31 stars 8 forks source link

Creating table from Model class #16

Closed nobrin closed 12 years ago

nobrin commented 12 years ago

The macaron.create_table() is added, which executes CREATE TABLE clause with Model class definition. Now this implementation is experimental. It is under testing.

nobrin commented 12 years ago

Meta class under Model class will be implemented in macaron.create_table(), like Django. At least, that will support ordering and unique_together. But I wonder those properties are provides by Meta class. However, the table name is specified by Model._table_name attribute.

nobrin commented 12 years ago

Model._unique_together and Model._ordering is supported. Currently, for simple use, Macaron's model is not defined by Meta class.