Transforme trechos de PostgreSQL em imagens que valem a pena compartilhar, sem sair do seu Mac.
Postgres-specific syntax is worth screenshotting precisely because it is not portable SQL. The window functions and CTEs are the point.
O Codeshot detecta PostgreSQL pelo código que você cola, então não há seletor de linguagem para errar. Aqui está o mesmo trecho em três dos 30 temas inclusos, renderizados com as folhas de estilo do próprio app.
WITH recent AS (
SELECT theme, created_at
FROM snapshots
WHERE created_at >= NOW() - INTERVAL'30 days'
)
SELECT theme,
COUNT(*) AS total,
RANK() OVER (ORDERBY COUNT(*) DESC) AS position
FROM recent
GROUPBY theme;
Edge · escuro
WITH recent AS (
SELECT theme, created_at
FROM snapshots
WHERE created_at >= NOW() - INTERVAL'30 days'
)
SELECT theme,
COUNT(*) AS total,
RANK() OVER (ORDERBY COUNT(*) DESC) AS position
FROM recent
GROUPBY theme;
GitHub · escuro
WITH recent AS (
SELECT theme, created_at
FROM snapshots
WHERE created_at >= NOW() - INTERVAL'30 days'
)
SELECT theme,
COUNT(*) AS total,
RANK() OVER (ORDERBY COUNT(*) DESC) AS position
FROM recent
GROUPBY theme;
Solarized · escuro
Escolhendo um tema para PostgreSQL
Format the query before you capture it. A CTE that wraps mid-line is unreadable as an image, and unlike text nobody can reformat it themselves.
Acertando o tamanho
Deixe a imagem seguir o conteúdo ou fixe uma proporção — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 ou 3:4 — e exporte em 1×, 2× ou 3× para que continue nítida em telas retina. Copie direto para a área de transferência com ⌘⇧C ou salve com ⌘S.