Differences From
Artifact [5b8778f17f]:
91 91 from_idx: uint64
92 92 }
93 93 union {
94 94 to_time: m.timepoint
95 95 to_idx: uint64
96 96 }
97 97 }
98 +
99 +terra m.range:matrix()
100 + if self.mode == 0 then
101 + return self.from_time,self.to_time,0,0
102 + elseif self.mode == 1 then
103 + return self.from_time,0,self.to_idx,0
104 + elseif self.mode == 2 then
105 + return 0,self.to_time,0,self.from_idx
106 + elseif self.mode == 3 then
107 + return 0,0,self.to_idx,self.from_idx
108 + else lib.bail('invalid mode on timeline range!') end
109 +end
98 110
99 111 struct m.post {
100 112 id: uint64
101 113 author: uint64
102 114 subject: str
103 115 body: str
104 116 acl: str
105 117 posted: m.timepoint
106 118 discovered: m.timepoint
107 119 mentions: lib.mem.ptr(uint64)
108 120 circles: lib.mem.ptr(uint64) --only meaningful if scope is set to circle
109 - convo: uint64
121 + convoheaduri: str
110 122 parent: uint64
111 123 -- ephemera
112 124 localpost: bool
113 125 source: &m.source
114 126 }
115 127
116 128 local cnf = terralib.memoize(function(ty,rty)
................................................................................
222 234 -- uid: uint64
223 235
224 236 actor_conf_str: cnf(rawstring, lib.mem.ptr(int8))
225 237 actor_conf_int: cnf(intptr, lib.stat(intptr))
226 238
227 239 post_save: {&m.source, &m.post} -> {}
228 240 post_create: {&m.source, &m.post} -> uint64
229 - actor_post_fetch_uid: {&m.source, uint64, m.range} -> lib.mem.ptr(m.post)
241 + post_enum_author_uid: {&m.source, uint64, m.range} -> lib.mem.ptr(lib.mem.ptr(m.post))
230 242 convo_fetch_xid: {&m.source,rawstring} -> lib.mem.ptr(m.post)
231 243 convo_fetch_uid: {&m.source,uint64} -> lib.mem.ptr(m.post)
232 244
233 - actor_timeline_fetch_uid: {&m.source, uint64, m.range} -> lib.mem.ptr(lib.mem.ptr(m.post))
234 - instance_timeline_fetch: {&m.source, m.range} -> lib.mem.ptr(lib.mem.ptr(m.post))
245 + timeline_actor_fetch_uid: {&m.source, uint64, m.range} -> lib.mem.ptr(lib.mem.ptr(m.post))
246 + timeline_instance_fetch: {&m.source, m.range} -> lib.mem.ptr(lib.mem.ptr(m.post))
235 247 }
236 248
237 249 struct m.source {
238 250 backend: &m.backend
239 251 id: lib.mem.ptr(int8)
240 252 handle: &opaque
241 253 string: lib.mem.ptr(int8)