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

Add extends queryBuilder documentation - related to #3334 #218

Merged
merged 3 commits into from Jul 23, 2019

Conversation

felixmosh
Copy link
Contributor

No description provided.

@kibertoad
Copy link
Collaborator

@felixmosh Can you also add documentation for extending the TS QueryBuilder interface?

sections/builder.js Outdated Show resolved Hide resolved
sections/builder.js Outdated Show resolved Hide resolved
sections/builder.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@kibertoad kibertoad left a comment

Choose a reason for hiding this comment

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

Review comments added.

@kibertoad kibertoad merged commit 8142e3c into knex:gh-pages Jul 23, 2019
@cjnqt
Copy link

cjnqt commented Aug 21, 2019

If I understand correctly, the docs show the .extend function being used before initialisation of the connection.

But how do you extend the query builder and then initialise the connection? knex.initialize(config) doesn't work (seems to be deprecated)

@kibertoad
Copy link
Collaborator

@cjnqt From my understanding you don't need to do it in some very spefic moment, as extension is quite global. You can do it once during your application initialization, before you start building any queries, and then you are good.

@elhigu
Copy link
Member

elhigu commented Aug 22, 2019

knex.initialize(config) should work at least I haven't heard it being deprecated. Though it is only needed if you call knex.destroy() and after that you need to reinitialize the same knex instance with new pool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants