Changeset 3 for supermodel/trunk/supermodel/fields.py
- Timestamp:
- 01/17/07 17:05:18 (6 years ago)
- Files:
-
- 1 modified
-
supermodel/trunk/supermodel/fields.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
supermodel/trunk/supermodel/fields.py
r1 r3 24 24 25 25 26 class HasField(object): 27 """ 28 Specifies one field of an entity 29 """ 30 31 def __init__(self, entity, name, *args, **kwargs): 32 field = Field(*args, **kwargs) 33 field.colname = name 34 entity._descriptor.add_field(field) 35 36 has_field = Statement(HasField) 37 38 26 39 class WithFields(object): 27 40 28 41 """ 29 Specifies all fields of an entity 42 Specifies all fields of an entity at once 30 43 """ 31 44 … … 39 52 desc.add_field(field) 40 53 54 with_fields = Statement(WithFields) 41 55 42 with_fields = Statement(WithFields)
