Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate pg shorthand in sql/pg #3

Merged
merged 4 commits into from
Sep 14, 2018
Merged

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