Lines Matching refs:tableName

52       await this.query(`create view ${this.tableName('sched_wakeup')} AS
63 `create virtual table ${this.tableName('window')} using window;`);
67 await this.query(`create view ${this.tableName('start')} as
69 (select ts from ${this.tableName('sched_wakeup')} UNION
75 await this.query(`create view ${this.tableName('fill')} AS
77 (select ts from ${this.tableName('start')}),
79 (select min(ts) from ${this.tableName('sched_wakeup')}),
81 )) - (select ts from ${this.tableName('start')}) as dur,
85 await this.query(`create view ${this.tableName('full_sched_wakeup')} as
86 select * from ${this.tableName('sched_wakeup')} UNION
87 select * from ${this.tableName('fill')}`);
89 await this.query(`create virtual table ${this.tableName('span')}
91 ${this.tableName('full_sched_wakeup')} partitioned utid,
97 await this.query(`create view ${this.tableName('span_view')} as
102 when lag(end_state) over ${this.tableName('ordered')} is not null
103 then lag(end_state) over ${this.tableName('ordered')}
106 from ${this.tableName('span')}
108 window ${this.tableName('ordered')} as (order by ts)`);
110 await this.query(`create view ${this.tableName('long_states')} as
111 select * from ${this.tableName('span_view')} where dur >= ${minNs}`);
116 await this.query(`create view ${this.tableName('fill_gaps')} as select
117 (select min(ts) from ${this.tableName('span_view')}) as ts,
119 (select min(ts) from ${this.tableName('span_view')}) as dur,
122 await this.query(`create virtual table ${this.tableName('summarized')}
123 using span_left_join(${this.tableName('fill_gaps')} partitioned utid,
124 ${this.tableName('long_states')} partitioned utid)`);
126 await this.query(`create virtual table ${this.tableName('current')}
128 ${this.tableName('window')},
129 ${this.tableName('summarized')} partitioned utid)`);
137 this.query(`update ${this.tableName('window')} set
142 this.query(`drop view if exists ${this.tableName('long_states')}`);
143 this.query(`drop view if exists ${this.tableName('fill_gaps')}`);
145 await this.query(`create view ${this.tableName('long_states')} as
146 select * from ${this.tableName('span_view')} where dur > ${minNs}`);
148 await this.query(`create view ${this.tableName('fill_gaps')} as select
149 (select min(ts) from ${this.tableName('span_view')}) as ts,
151 this.tableName(
158 from ${this.tableName('current')}`;
208 this.query(`drop table ${this.tableName('window')}`);
209 this.query(`drop table ${this.tableName('span')}`);
210 this.query(`drop table ${this.tableName('current')}`);
211 this.query(`drop table ${this.tableName('summarized')}`);
212 this.query(`drop view ${this.tableName('sched_wakeup')}`);
213 this.query(`drop view ${this.tableName('fill')}`);
214 this.query(`drop view ${this.tableName('full_sched_wakeup')}`);
215 this.query(`drop view ${this.tableName('span_view')}`);
216 this.query(`drop view ${this.tableName('long_states')}`);
217 this.query(`drop view ${this.tableName('fill_gaps')}`);