New attributes API #117
Labels
No labels
Doing
To Do
bug
clarification needed
duplicate
enhancement
help wanted
invalid
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nik/veripeditus-server#117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We want to move a more abstract API for setting attributes on game objects.
For setting an attribute:
my_object.foo = barFor getting an ttribute:
my_obecjt.fooDoing that, we also want to support storing arbitrary data types. It might be advisable to use the Pickle data type from SQLAlchemy as the attribute's value column instead of string.
The
__setattr__method must make sure to not handle attributes that are real databse columns - it must only handle attributes that are not used by the model itself! All others must be passed on to the superclass'__setattr__method.Same goes for
__getattr__, which must return existing, real attributes verbatim.Mind that there are a lot of corner cases for all of that!
@Creeparoo please work in a new branch, branched from current
master.Started branch
117-new-attributes-apiMentioned in commit
ac6023acdfMentioned in commit
7af3125bc0Mentioned in commit
793fc1acb4Mentioned in commit
270e2a1140Mentioned in commit
29e7e88323Mentioned in commit
d83abed90bStatus changed to closed by commit
d83abed90b