parsav  Check-in [7239d174b1]

Overview
Comment:clean up debug code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7239d174b1ad982e271f9e4490594000f78c38c759215d87cae100e8b7b16ea1
User & Date: lexi on 2021-01-05 22:13:07
Other Links: manifest | tags
Context
2021-01-05
22:42
add notices link check-in: 8a8a11609d user: lexi tags: trunk
22:13
clean up debug code check-in: 7239d174b1 user: lexi tags: trunk
22:10
improve sql, js, docs, other tweaks check-in: 7bd78f9b1c user: lexi tags: trunk
Changes

Modified backend/schema/pgsql-views.sql from [47dae6d49a] to [54b7851d27].

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
		) as post,
		cn.promotime::bigint as tltime,
		coalesce(cn.promoter, (cn.orig).author) as promoter
	from content as cn
	order by cn.promotime desc
);

--
--create temp view parsavpg_post_threads as (
--
--);
--
create temp view parsavpg_notices as (
 -- TODO add mentions
	with ntimes as (
		select uid, value as when from parsav_actor_conf_ints where key = 'notice-clear-time'
	), acts as (
		select row(
				kmap.kind::smallint,
................................................................................
				null::bigint,
				null::text
			)::pg_temp.parsavpg_intern_notice as notice,
			p.author as rcpt
		from parsav_acts as a
			inner join parsav_posts as p on a.subject = p.id
			inner join (values
				('rt',    4 ),
				('like',  3 ),
				('react', 5 )
			) as kmap(kstr,kind) on kmap.kstr = a.kind
			left  join ntimes as nt on nt.uid = p.author
		where a.time >= coalesce(nt.when,0)
	), replies as (
		select row(
				2::smallint,
				coalesce(p.posted,p.discovered),
				p.author,
				p.parent,
				p.id,
				null::text
			)::pg_temp.parsavpg_intern_notice as notice,
			par.author as rcpt







<



|







 







|
|
|





|







127
128
129
130
131
132
133

134
135
136
137
138
139
140
141
142
143
144
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
		) as post,
		cn.promotime::bigint as tltime,
		coalesce(cn.promoter, (cn.orig).author) as promoter
	from content as cn
	order by cn.promotime desc
);


--create temp view parsavpg_post_threads as (
--
--);

create temp view parsavpg_notices as (
 -- TODO add mentions
	with ntimes as (
		select uid, value as when from parsav_actor_conf_ints where key = 'notice-clear-time'
	), acts as (
		select row(
				kmap.kind::smallint,
................................................................................
				null::bigint,
				null::text
			)::pg_temp.parsavpg_intern_notice as notice,
			p.author as rcpt
		from parsav_acts as a
			inner join parsav_posts as p on a.subject = p.id
			inner join (values
				('rt',    <notice:rt>   ),
				('like',  <notice:like> ),
				('react', <notice:react>)
			) as kmap(kstr,kind) on kmap.kstr = a.kind
			left  join ntimes as nt on nt.uid = p.author
		where a.time >= coalesce(nt.when,0)
	), replies as (
		select row(
				<notice:reply>::smallint,
				coalesce(p.posted,p.discovered),
				p.author,
				p.parent,
				p.id,
				null::text
			)::pg_temp.parsavpg_intern_notice as notice,
			par.author as rcpt

Modified store.t from [194a7e6d10] to [e1429862ec].

89
90
91
92
93
94
95

96
97
98
99
100
101
102
	(pow.visible   << true)
	(pow.post      << true)
	(pow.shout     << true)
	(pow.propagate << true)
	(pow.artifact  << true)
	(pow.account   << true)
	(pow.edit      << true)

	return m.rights { rank = 0, quota = 1000, invites = 0, powers = pow; }
end

struct m.actor {
	id: uint64
	nym: str
	handle: str







>







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	(pow.visible   << true)
	(pow.post      << true)
	(pow.shout     << true)
	(pow.propagate << true)
	(pow.artifact  << true)
	(pow.account   << true)
	(pow.edit      << true)
	(pow.snitch    << true)
	return m.rights { rank = 0, quota = 1000, invites = 0, powers = pow; }
end

struct m.actor {
	id: uint64
	nym: str
	handle: str