Skip to content

Conversation

@lucleray
Copy link
Member

The goal of this PR is to make the postgres shorthand "opt-in".

Before :

const sql = require('@sequencework/sql')
const movies = await sql(db)`select * from movies`

After :

const sql = require('@sequencework/sql/pg') // ⚠️we import @sequencework/sql/pg
const movies = await sql(db)`select * from movies`

IMO, it also makes the code cleaner.

Copy link
Collaborator

@yannvgn yannvgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. As a next step, it might be interesting to refine this separation to figure out how to support other clients (and their query format).

But let's keep it simple for the moment 👌

@lucleray lucleray merged commit 9c9f1e8 into master Sep 14, 2018
@lucleray lucleray deleted the split-postgres-shorthand branch September 14, 2018 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants