forked from vfxetc/sgsession
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO.txt
40 lines (27 loc) · 1.57 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- Document that sessions and entities lose all data on pickling.
- Attachment entities have a this_field field which is a dict that looks
very much like an entity. This should be special cased so that it doesn't
get merged into the Attachment entity (which results in trouble when copying
attachments from one entity to another).
- mutable collections: BoundList and BoundDict
- attach to an Entity and merge all new data into the session
- allow native tuples, but merge everything in them
- in the future they can mark an entity as updated so that session.commit()
can update everything in a batch
- session.create(*, **, defer=True) will be created during a
commit
- fetch should complain when the entity doesn't exist, or mark the entity as
retired. Perhaps it is best to fail quickly and raise EntityIDError
- entity.refresh()
- session.refresh(entities)
- entity.commit(), an Entity-level update
- entity.delete()
- only fetch the "important" fields/links that are not already satisfied, unless
explicitly requested to do so
- ORM-style queries, to simplify the new deep-filters
sg.query('PublishEvent', 'sg_type', 'sg_version').filter('id', '>', 12).order_by('created_at').one()
sg.query('Task', 'content', 'step').filter({'assignees': me}, 'or', {'assignees': mark}
sg.get(type_, id) -> sg.Task(id) -> sg.query(type_).filter('id', 'is', id).first()
- track fields which don't exist with a sentinel so that Entity.fetch(...) knows to not go looking for it on the next call.
- with session.batch() as batch:
x = batch.create('Task', ...)