Skip to content

Uncyclo: Add sql to the extras #1729

Closed
Closed
@lucleray

Description

@lucleray

Hi 👋

We love pg and we use it a lot so we made sql, a tiny module to create query objects with template literals :

const query = sql`select * from movies where author = ${author}`
const result = await db.query(query)

It has some nice shorthands with pg :

const movies = await sql.many(db)`select * from movies`
const movie = await sql.one(db)`select * from movies where id = ${id}`

Maybe it could be added to the extra page in the wiki ?

Thanks for this great module !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions