São José dos Campos / São Paulo
Linkedin: https://www.linkedin.com/in/frmichetti
GitHub: https://github.com/frmichetti
Email: frmichetti@gmail.com
São José dos Campos / São Paulo
package main | |
import ( | |
"net/http" | |
"github.com/gin-gonic/gin" | |
) | |
// album represents data about a record album. | |
type album struct { |
const backPages = (page:number,limit:number) => { | |
const pages = [] | |
for(let x = page ; x > 0; x--){ | |
if (x == page) continue; | |
if (pages.length == limit) continue; | |
pages.push(x) | |
} | |
return pages; | |
} |
create extension intarray ; | |
CREATE TABLE messages ( | |
created_at timestamp DEFAULT now(), | |
reply_to int REFERENCES messages, | |
id int PRIMARY KEY | |
GENERATED BY DEFAULT AS IDENTITY, | |
content text, | |
CHECK (reply_to <> id) | |
); |