20 Commits

Author SHA1 Message Date
Igor Savin
e37aeaa31c
Prepare for 0.21.0 release (#3811) 2020-04-19 00:40:23 +02:00
tkalliom
02d94d96b0
Reduce size of lodash in bundle (#3804) 2020-04-18 19:41:23 +02:00
Brian Lauber
37d9c30347
Fix/method binding on knex proxy (#3717)
* knex methods are proxies for context methods ...

... as opposed to injecting the methods directly onto the knex
function.  (Which was then causing `this` to point to the wrong
object when evaluating the context methods)

* Moved CONTEXT_METHODS constant to a higher scope

* mv knex.context -> this.context

* Extracted KNEX_PROPERTY_DEFINITIONS to module scope ...

... which was possible since all of the properties reference
`this` instead of `knex` now

* shallowCloneFunction no longer accesses _context ...

... instead, it uses the normal context property

* transaction method delegates to _transaction ...

... This way, we can be sure that the lower-level details are
consistent across implementations.  Individual implementations
just need to handle the quirks around setting up the `config`
and `outerTx`

* CONTEXT_METHODS shared. Fixed override of withUserParams ...

Restructured the code so that CONTEXT_METHODS populates the
KNEX_PROPERTY_DEFINITIONS with the proxy methods.

In doing so, it also exposed the fact that the withUserParams(..)
method was being overridden on the Transactor instead of its
context.  So, that bug was fixed as well.

* Added a TODO to remove client.makeKnex(..) in future PR

* Added a warning about QueryBuilder.extend(..) and side-effects
2020-03-11 16:05:03 -04:00
Brian Lauber
f3151bdc93
Cleanup and extract Transaction Workflow logic (rebase) (#3674) 2020-02-20 20:44:18 +01:00
Ahmed Ashour
a613fe23df Fix some spelling mistakes (#3572) 2019-12-10 22:53:05 +01:00
Ricardo Graça
9aa7085b05 Rename src directory to lib (#3338) 2019-07-10 23:48:43 +02:00
Mikael Lepistö
7140a48226 Remove generated lib from repository and run build in prepublish 2016-01-21 09:59:30 +02:00
Rhys van der Waerden
360ffc77d3 release 0.9.0 2015-11-02 14:54:38 +11:00
Tim Griesser
89fe76faa3 release 0.8.6 2015-05-20 11:21:59 -04:00
Tim Griesser
e024fa6b87 release 0.8.5 2015-05-14 00:45:51 -04:00
Tim Griesser
ee388d3bb9 release 0.8.4 2015-05-13 15:23:15 -04:00
Tim Griesser
7e884cb325 Babel src -> lib, remove gulp 2015-05-09 13:58:18 -04:00
Tim Griesser
f93be5e6b2 release 0.8.3 2015-05-02 13:14:32 -04:00
Tim Griesser
2ed591dc06 release 0.8.2 2015-05-01 14:55:53 -04:00
Tim Griesser
564e520fa3 release 0.8.1 2015-05-01 11:59:02 -04:00
Tim Griesser
ff76297506 Normalize connection config, fix #789 2015-04-29 15:14:41 -04:00
Tim Griesser
46e318d6da Cleaning up transactions, passing options arg to pipe 2015-04-23 14:51:33 -04:00
Tim Griesser
e570c167c1 JSHint and formatting 2015-04-22 15:39:29 -04:00
Tim Griesser
f4a6b4afa4 Fix undefined warn 2015-04-22 11:44:52 -04:00
Tim Griesser
f9aab9dc76 Major internal refactor
Beefed up transaction implementation, still needs tests
and cleanup of nested transaction queues.

Left todo:
- Fix commented out tests
- Fix oracle driver's transactions
2015-04-22 10:34:14 -04:00