Skip to content

Instantly share code, notes, and snippets.

View xvaara's full-sized avatar

Jukka Raimovaara xvaara

View GitHub Profile
@xvaara
xvaara / lazy-component.vue
Created September 13, 2022 03:26
vue lazy componennt
<template>
<component
:is="tag"
ref="wrapper"
:style="{
minWidth: '1px',
minHeight: '1px',
}"
>
<slot v-if="show" />
@xvaara
xvaara / delete_by_segmentby.sql
Created October 12, 2022 09:22
timescaledb delete from compressed hypertable with segmentby
CREATE OR REPLACE FUNCTION delete_segmentby(_tbl regclass, _col varchar, _id anyelement, OUT result integer)
LANGUAGE plpgsql AS
$$
DECLARE
_schema varchar := (SELECT nspname
FROM pg_catalog.pg_class AS c
JOIN pg_catalog.pg_namespace AS ns
ON c.relnamespace = ns.oid
WHERE c.oid = _tbl);
_table_name varchar := (