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

Fix incorrect MSSQL query building with lock used, with clause and Number with decimal part conversion #1707

Merged
merged 14 commits into from Nov 26, 2016

Conversation

Projects
None yet
3 participants
@statyan
Contributor

statyan commented Sep 29, 2016

Fixed MSSQL incorect query build when locks are used. MSSQL requires lock hint be placed just after FROM clause. This colud be semi-fix, causeit wolud work for one-table query only. If there is any way to separate FROM and JOIN knex query build phase - I can "upgrade" my fix then.

@statyan

This comment has been minimized.

Contributor

statyan commented Sep 29, 2016

Hmm, why github shows all my commits ? Some of them were already pushed to knex master with previous pull request. Is this ok?

Statyan and others added some commits Oct 18, 2016

Added "WITH" clause to select, update, insert and delete queries.
Fixed forUpdate lock query building
Add detection of decimal value of Numeric parameter and set proper sql.Type for it. (Fix for #1604)

@statyan statyan changed the title from Fix incorrect MSSQL query building with lock used to Fix incorrect MSSQL query building with lock used, with clause and Number with decimal part conversion Oct 19, 2016

@elhigu

This comment has been minimized.

Collaborator

elhigu commented Nov 24, 2016

When merging this remember to use squash merge :)
screen shot 2016-11-24 at 14 21 28

@smorey2 smorey2 merged commit 99ac60a into tgriesser:master Nov 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@statyan

This comment has been minimized.

Contributor

statyan commented Nov 26, 2016

I'll make a tattoo "Use squash merge, Luke!" )

elhigu added a commit to elhigu/knex that referenced this pull request Feb 15, 2017

Fix incorrect MSSQL query building with lock used, with clause and Nu…
…mber with decimal part conversion (tgriesser#1707)

* Fixed knex tgriesser#1577
Aslo corrected tests for primarykey

* Fix for installing from github

* Fix for installing from github

* Fix for installing from github

* Move LOCK hint for MSSQL after join component of select

* Add missing import statement

* Added "WITH" clause to select, update, insert and delete queries.
Fixed forUpdate lock query building
Add detection of decimal value of Numeric parameter and set proper sql.Type for it. (Fix for tgriesser#1604)

* Change let to const for variable declaration

* Fix MSSQL non-numeric parameters binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment