50 Commits

Author SHA1 Message Date
Igor Savin
941b660f53
Initial infrastructure for CockroachDB (#4571) 2021-10-02 23:45:17 +03:00
Igor Savin
b0b36b9fcd
Do not install pg-native by default (#4699) 2021-10-02 16:55:06 +03:00
Matt Machuga
01cfa98c2c
Adding support for pg-native (#4327) 2021-09-06 16:04:23 +03:00
Ziyaddin Sadigov
e44b2a28bf
Colorize code snippets in readme files (#4234) 2021-01-16 17:23:29 +02:00
Ben Lu
a31f0400e6
Add transaction isolation support (#4185) 2020-12-30 18:13:35 +02:00
Igor Savin
2aec21ed5e
Try to introduce some organization into how files are grouped (#4178) 2020-12-28 16:55:08 +02:00
Igor Savin
b4f5080097
Add GitHub Actions (#4168) 2020-12-22 10:28:58 +02:00
Igor Savin
e37aeaa31c
Prepare for 0.21.0 release (#3811) 2020-04-19 00:40:23 +02:00
maximelkin
2270c112e8
Speed up CI by tweaking db configs (#3688) 2020-03-06 22:25:54 +01:00
maximelkin
b025aea318
remove dependency on bluebird methods from sources (#3683)
Co-authored-by: Brian Lauber <constructible.truth@gmail.com>
2020-02-25 22:50:24 +01:00
maximelkin
8159f04c12
Remove dependency on bluebird methods from tests (#3682)
* Remove dependency on bluebird methods from tests
* Introduce `"chai-as-promised"` plugin
* Minor enhancements to the testing logic
2020-02-24 19:24:30 -05:00
Igor Savin
4b6429ebf9
Reduce bluebird usage (#3267) 2019-06-08 02:34:41 +02:00
Quinn Chaffee
ab6a3047aa Remove Bluebird.try (#3263) 2019-06-07 23:30:39 +02:00
Mikael Lepistö
8a9a648ae2
Docker based test dbs (#3157)
* Fixed some of the tests failing with various dialect combinations

* Setup all test databases to run in docker

* Fixed test suite and updated travis to use docker

* Fixed some tests in master and disabled oracle tests while setting everything else to work again

* Changed docker to use latest postgresql alpine image

* Re-enabled all oracledb tests

* Install oracle client libs to oracle server and copy them to travis to make node oracledb package to work

* Disabled random failing oracle tests and added test to show that oracle update in transaction does not seem to work ACID

* Update package.json

* Update package.json

* Fixed linting issues

* Fixed waiting for postgres to use the same DB image that database is using.

* Removed installing oracledb driver in travis if not needed .travis.yml

* Cleaned up package.json more

* Created static name for oracledb container to allow copying files out of it on different docker versions

* Removed webpack from deps
2019-05-13 12:21:36 +03:00
Mikael Lepistö
8fe575e0f7 Updated next realease guide how to run tests 2019-01-31 05:41:42 +02:00
Igor Savin
3d636b3215 Fix execution of Oracle tests on Node 11 (#2920) 2018-11-21 10:18:41 +02:00
Mikael Lepistö
8e0ce7a450
Updated styling of markdown. 2018-09-19 01:25:58 +03:00
Mikael Lepistö
291fa4d130 Updated changelog / package.json for @next release 2018-09-19 01:16:07 +03:00
Tim Griesser
232fe9f151
Add Prettier (#2697)
* Add prettier
* Run files through prettier
2018-07-09 08:10:34 -04:00
Mikael Lepistö
cb3a85e738
Normalized and validated driverNames of test db clients and fixed oracle test setup (#2692)
* Normalized and validated driverNames of test db clients and fixed oracle test setup

* Fixed failed queries from old query building tests which hadn't been ran in ages

* Allow selecting node version which is used to run oracledb docker tests

* Improved sql tester error messages

* Fixed rest of the oracledb tests

* Removed invalid flag from docker-compose

* Print mssql logs if initialization fails

* Fixed syntax error + final tests

* Added restart of failure for mssql DB initialization to try again if server was not ready

* Printout always mssql logs after container is started

* Fixed wait time printing after trying to connect

* Use npm run oracledb:test for testing oracle in travis
2018-07-08 14:10:51 +03:00
Igor Savin
3282d6a890 chore: Update dependencies. Remove estraverse (#2691)
* Update dependencies. Remove estraverse

* Fix compatibility with new Sinon

* Increase mssql timeout
2018-07-07 10:47:51 +03:00
Mikael Lepistö
b349ac4a8c
Various fixes to mssql dialect (#2653)
* Fixed float type of mssql to be float

* Many tests where postgres test was not actually ran at all

* Migrations to be mssql compatible

Mssql driver doesn't handle if multiple queries are sent to same transaction concurrently.

* Prevented mssql failing when invalid schema builder was executed by accident

Instead of trying to generate sql from broken schema calls, just make exception to leak before query compiling is started

* Fixed mssql trx rollback to always throw an error

Also modified some connection test query to be mssql compatible

* Fixed various bugs from MSSQL driver to make tests run

* Fixed mssql unique index to be compatible with other dialect implementations

* Enable running mssql tests on CI

* Test for #2588

* Updated tests to not be dependend on tables left from previous test rans

* Trying to make mssql server work on travis
2018-06-29 10:47:06 +03:00
Mikael Lepistö
ae1245ebcb
Fix mssql driver crashing (#2637)
* Run SQL Server tests locally running SQL server in docker

* WIP mssql test stuff

* Patched MSSQL driver to not crash knex anymore
2018-06-10 23:56:08 +03:00
Mikael Lepistö
ce0946e74b
Runnin mssql tests in docker (#2496)
* Run SQL Server tests locally running SQL server in docker

* Made oracledb test script naming consistent with mssql

* Updated documentation with more info about oracledb and mssql testing
2018-02-20 11:51:51 +02:00
Mikael Lepistö
ece2da12ca
Added npm run test:oracledb command that runs oracledb tests in docker (#2491)
Also cleaned up some old docker configurations from test knexfile
2018-02-20 10:47:05 +02:00
Mikael Lepistö
e250260235
Added stress test, which uses TCP proxy to simulate flaky connections (#2460)
* Added stress test, which uses TCP proxy to simulate flaky connections

* Added test code for mysql and mariadb drivers

* Dropped trying to figure out support for mariasql driver

* Bunch of tests to make knex fail if connections are breaking randomly

* Added marker to printout logs before app crash

* Fixed mysql acquire connection and destroy conneciton code

Acquire connection did bind error handler too late and didn't free it on success. Destroy did free event listeners before connection end was called, so error during connection end leaked out.
2018-02-16 11:25:23 +02:00
Mikael Lepistö
4b9e44f8ef Added issue template and runkit example. 2017-11-14 22:23:11 +02:00
Mikael Lepistö
15639d03db Build native sql for a dialect without to string (#2237)
* Exposed also positionBinding method to client base class and refactored calls to em

* Added toSQL().toNative() getter which returns dialect specfic sql and bindings.

* Refactored toSQL method implementation
2017-09-27 13:12:40 +03:00
smulesoft
31ba04a788 fixes #1833 on postgres (#2017)
* fixes #1833 on postgres

* adds @elhigu requested changes

* adds test when database is down

* adds script for docker support

* removes old comment

* fixes syntax

* fixes more syntax errors

* fixes final syntax errors

* Docker testing enabled only on linux for now
2017-06-01 22:41:35 +03:00
wubzz
b06b8bfa29 Restore release.sh 2017-03-23 15:27:19 +01:00
wubzz
620ade8c6d Updated changelog for 0.12.9 2017-03-23 15:25:57 +01:00
wubzz
f67daaeef5 Restore release.sh script 2017-03-15 22:50:49 +01:00
wubzz
dbdc93cc8f release 0.12.8 2017-03-15 22:49:55 +01:00
Tim Griesser
a16639b156 Remove postinstall script for now 2016-10-19 15:10:23 -04:00
vellotis
7a04de4b87 Support using dependency straight from git repository (#1708)
Using build.js from Bookshelf 8ae37faeec/scripts/build.js
2016-10-09 17:38:13 -04:00
Tim Griesser
6d9f7b1720 Don't force master as release branch 2016-09-27 12:42:31 -04:00
Tim Griesser
d1a55a907d Moving bin/cli outside of src to allow install from master 2016-09-13 09:31:58 -04:00
Tim Griesser
0b25f6bd0c Upgrading to Babel 6 (#1617)
* Upgrading to Babel 6
* Fix assignment issue in mssql
* Drop Travis for node 0.10
2016-08-09 17:03:08 -04:00
Tim Griesser
ad859a707b Removing client build (#1616)
* Removing client build
2016-08-09 14:01:24 -04:00
Rhys van der Waerden
b21156d920 Prevent error in gh-pages script
If gh-pages branch was out of date this should prevent an error when pushing to origin.
2016-06-18 15:21:17 +10:00
Mikael Lepistö
b5d4f907ba Added webpack build test to npm test script 2016-05-29 10:08:39 +03:00
wubzz
d566ca28a2 Revert change to release script 2016-05-26 10:24:31 +02:00
wubzz
525bd56f85 release 0.11.5 2016-05-26 10:18:19 +02:00
Rhys van der Waerden
f320906577 Read version from package.json
Means that it's impossible to have `Knex#VERSION` and the version in `package.json` out of sync. This is one less thing to do for release.

This required the addition of `json-loader` for webpack. I've also added webpack to `devDependencies` rather than installing it manually during the `build` script.
2016-05-15 21:38:34 +10:00
Tim Griesser
031129f505 Add tap-spec reporter 2015-06-16 10:40:18 -04:00
Tim Griesser
7e884cb325 Babel src -> lib, remove gulp 2015-05-09 13:58:18 -04:00
Tim Griesser
12e6ada1a3 Fix for #805, warn for non-existent savepoints
In MySQL if a savepoint is missing, it means something
else (most likely DDL) triggered an implicit commit. In this
case rather than erroring, let's give a warning message
so it's possible to use the same codepath as a DB where
this actually works.
2015-05-01 11:26:29 -04:00
Tim Griesser
3dfe1e6c94 Final cleanup for 0.8 2015-04-30 18:11:41 -04:00
Tim Griesser
e179634600 Switch to shell script for release, other tidying of config/directories 2015-04-29 19:13:50 -04:00
Tim Griesser
c40b1339aa Update process for web script build 2015-04-29 17:11:52 -04:00