Trasforma gli snippet PostgreSQL in immagini che vale la pena condividere, senza uscire dal tuo Mac.
Postgres-specific syntax is worth screenshotting precisely because it is not portable SQL. The window functions and CTEs are the point.
Codeshot riconosce PostgreSQL dal codice che incolli, quindi non c’è nessun selettore di linguaggio da sbagliare. Ecco lo stesso snippet in tre dei 30 temi inclusi, resi con i fogli di stile dell’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 · scuro
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 · scuro
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 · scuro
Scegliere un tema per 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.
Azzeccare la misura
Lascia che l’immagine segua il contenuto o bloccala su un rapporto — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 o 3:4 — poi esporta a 1×, 2× o 3× così resta nitida su uno schermo retina. Copiala negli appunti con ⌘⇧C oppure salvala con ⌘S.