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

mssql provider #1090

Merged
merged 12 commits into from Dec 15, 2015

Conversation

Projects
None yet
5 participants
@smorey2
Collaborator

smorey2 commented Dec 9, 2015

Here is the completed mssql provider. all tests cloned, modified, and passed.

I would recommend perhaps adding lib/ to the .gitignore folder.

Let me know if there are any questions.

Sky Morey
smorey@degdigital.com

@rhys-vdw

This comment has been minimized.

Collaborator

rhys-vdw commented Dec 10, 2015

Hey @Grimace1975. Tests are failing because of linter errors apparently.

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 10, 2015

Which tests. I set db=mssql and ran mocha fine.

Noticed there was some automated build that kicked off. And showed some warnings about un-used variables. Plus some things in a whole seperate part of project which I didn't touch.

And also the CI build errors failed from some npm issues. I never did anything with those. Was just focused on the mssql dialog and it's tests.

Sky Morey
Sent from my iPhone

On Dec 9, 2015, at 9:34 PM, Rhys van der Waerden <notifications@github.commailto:notifications@github.com> wrote:

Hey @Grimace1975https://github.com/Grimace1975. Tests are failing because of linter errors apparently.

Reply to this email directly or view it on GitHubhttps://github.com//pull/1090#issuecomment-163477046.

@rhys-vdw

This comment has been minimized.

Collaborator

rhys-vdw commented Dec 10, 2015

Travis CI tests, see here.

Specifically:

test/integration/builder/aggregate.js: line 71, col 36, Expected '===' and instead saw '=='.
src/dialects/mssql/schema/columncompiler.js: line 49, col 18, 'column' is defined but never used.
src/dialects/mssql/schema/columncompiler.js: line 57, col 17, 'allowed' is defined but never used.
src/dialects/mssql/schema/tablecompiler.js: line 46, col 21, 'comment' is defined but never used.
src/dialects/mssql/transaction.js: line 5, col 5, 'helpers' is defined but never used.
src/dialects/mssql/transaction.js: line 23, col 23, 'conn' is defined but never used.
src/dialects/mssql/transaction.js: line 52, col 30, 'error' is defined but never used.
src/dialects/mssql/transaction.js: line 52, col 24, 'conn' is defined but never used.
8 errors

They're linter errors fired from the mssql dialect. Not sure why they weren't raised locally.

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 10, 2015

Ya those are minor. I didn't know warnings are errors. And I'll fix those tomorrow. Do I just put another pull request in after.

Also I don't have to worry about the npm errors it showed right.

I am on a Windows box. And just running mocha and bable. Maybe those don't run linter

Let get this done with and ready for people to use. I'll get to these tomorrow morning. Hope that's ok.

Sky Morey
Sent from my iPhone

On Dec 9, 2015, at 9:45 PM, Rhys van der Waerden <notifications@github.commailto:notifications@github.com> wrote:

Travis CI tests, see herehttps://travis-ci.org/tgriesser/knex/builds/95928730.

Specifically:

test/integration/builder/aggregate.js: line 71, col 36, Expected '===' and instead saw '=='.
src/dialects/mssql/schema/columncompiler.js: line 49, col 18, 'column' is defined but never used.
src/dialects/mssql/schema/columncompiler.js: line 57, col 17, 'allowed' is defined but never used.
src/dialects/mssql/schema/tablecompiler.js: line 46, col 21, 'comment' is defined but never used.
src/dialects/mssql/transaction.js: line 5, col 5, 'helpers' is defined but never used.
src/dialects/mssql/transaction.js: line 23, col 23, 'conn' is defined but never used.
src/dialects/mssql/transaction.js: line 52, col 30, 'error' is defined but never used.
src/dialects/mssql/transaction.js: line 52, col 24, 'conn' is defined but never used.
8 errors

They're linter errors fired from the mssql dialect. Not sure why they weren't raised locally.

Reply to this email directly or view it on GitHubhttps://github.com//pull/1090#issuecomment-163478534.

@rhys-vdw

This comment has been minimized.

Collaborator

rhys-vdw commented Dec 10, 2015

Ya those are minor. I didn't know warnings are errors. And I'll fix those tomorrow. Do I just put another pull request in after.

No problem, sounds good.

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 10, 2015

new pull ready. not sure how to run the CI again. but it should pass

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 10, 2015

@rhys-vdw ok so there are still errors. but outside of my scope.

when i pulled this project initially and ran babel. it modified files in lib.

  1. shouldn't source and lib be lined up. or are people making changes to lib directly.
  2. i can repull from source, and only change my files. but when babel is ran again it will override what ever lib changes are made.
@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 11, 2015

@rhys-vdw what is the status on this. The build is breaking because its trying to run mssql tests when no server exists. what are the next steps?

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Dec 14, 2015

@Grimace1975 just take mssql out of testIntegrationDialects in test/knexfile.js and we should be good to go here. Thanks so much!

@crowebird

This comment has been minimized.

crowebird commented Dec 14, 2015

Can't wait for this to be added! +1 @Grimace1975

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 14, 2015

@tgriesser
noticed the format was not in correct Microsoft formatting, so i modified into compact create-table format. Also changed unique index to unique constraint. I believe that is the same behavior wanted.

tgriesser added a commit that referenced this pull request Dec 15, 2015

@tgriesser tgriesser merged commit c7a659a into tgriesser:master Dec 15, 2015

1 check passed

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

This comment has been minimized.

Owner

tgriesser commented Dec 15, 2015

Great work! Haven't had a chance to review all of it, but I've added you as a collaborator so feel free to open/merge any PR's that come up related to mssql dialect.

As I mentioned to @rhys-vdw recently via email, I'll be jumping back into knex full time in a few weeks and getting a course set for some features needed / some big overhauls to cleanup the codebase for readability, testability, etc. for a 1.0 release.

I'll probably look to get this out officially with a 0.10 in a week or so, stay tuned... in the meantime it'd be great to have anyone interested checking this out off of master.

@crowebird

This comment has been minimized.

crowebird commented Dec 15, 2015

@tgriesser I've been waiting for this to get in :), and have been playing with it off of his branch. I'll be sure to report if I run into anything. I have not done anything really complex so far, but I have had no issues!

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Dec 15, 2015

Awesome! Thanks @crowebird!

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 15, 2015

Cool. And thanks. Also I added some small revisions but didn't push them down further.

I wanted to sql to work in visual studio so ended up pulling alter tables out and into the create statement. Noticed SQLite was doing it as well.

Pushed a mechanism of doing that up to parent schema. But not down to SQLite. And I don't completely like my solution.

Be nice to see what you end up stabilizing too.

May add triggers and more DDL also.

Be interesting to see what people use the mssql provider for.

Sky Morey
Sent from my iPhone

On Dec 14, 2015, at 11:12 PM, Tim Griesser <notifications@github.commailto:notifications@github.com> wrote:

Great work! Haven't had a chance to review all of it, but I've added you as a collaborator so feel free to open/merge any PR's that come up related to mssql dialect.

As I mentioned to @rhys-vdwhttps://github.com/rhys-vdw recently via email, I'll be jumping back into knex full time in a few weeks and getting a course set for some features needed / some big overhauls to cleanup the codebase for readability, testability, etc. for a 1.0 release.

I'll probably look to get this out officially with a 0.10 in a week or so, stay tuned... in the meantime it'd be great to have anyone interested checking this out off of master.

Reply to this email directly or view it on GitHubhttps://github.com//pull/1090#issuecomment-164646901.

@elhigu

This comment has been minimized.

Collaborator

elhigu commented Dec 15, 2015

@Grimace1975 Hi, I'm getting couple of build errors from master after this pull request was merged. Any ideas whats going on?

Mikaels-MacBook-Pro:Vincit mikaelle$ mkdir temp
Mikaels-MacBook-Pro:Vincit mikaelle$ cd temp/
Mikaels-MacBook-Pro:temp mikaelle$ git clone https://github.com/tgriesser/knex.git
Cloning into 'knex'...
cd knex
remote: Counting objects: 10924, done.
remote: Compressing objects: 100% (99/99), done.
remote: Total 10924 (delta 55), reused 0 (delta 0), pack-reused 10822
Receiving objects: 100% (10924/10924), 5.52 MiB | 393.00 KiB/s, done.
Resolving deltas: 100% (6686/6686), done.
Checking connectivity... done.
Mikaels-MacBook-Pro:temp mikaelle$ cd knex
Mikaels-MacBook-Pro:knex mikaelle$ npm install
... bunch of npm install output text here ...
Mikaels-MacBook-Pro:knex mikaelle$ npm run build

> knex@0.9.0 build /Users/mikaelle/Projects/Vincit/temp/knex
> ./scripts/build.sh

knex@0.9.0 /Users/mikaelle/Projects/Vincit/temp/knex
├─┬ istanbul@0.3.22
│ ├─┬ escodegen@1.7.1
│ │ └── esprima@1.2.5 
│ └─┬ handlebars@4.0.5
│   ├── source-map@0.4.4 
│   └─┬ uglify-js@2.6.1
│     ├── async@0.2.10 
│     └─┬ yargs@3.10.0
│       └── window-size@0.1.0 
├─┬ sqlite3@3.1.1
│ └─┬ node-pre-gyp@0.6.14
│   └─┬ tar-pack@2.0.0
│     └─┬ fstream@0.1.31
│       └── graceful-fs@3.0.8 
└── webpack@1.8.11  extraneous

src/bin/cli.js -> lib/bin/cli.js
src/client.js -> lib/client.js
src/connection/index.js -> lib/connection/index.js
src/dialects/maria/index.js -> lib/dialects/maria/index.js
src/dialects/maria/transaction.js -> lib/dialects/maria/transaction.js
src/dialects/mssql/formatter.js -> lib/dialects/mssql/formatter.js
src/dialects/mssql/index.js -> lib/dialects/mssql/index.js
src/dialects/mssql/query/compiler.js -> lib/dialects/mssql/query/compiler.js
src/dialects/mssql/schema/columncompiler.js -> lib/dialects/mssql/schema/columncompiler.js
src/dialects/mssql/schema/compiler.js -> lib/dialects/mssql/schema/compiler.js
src/dialects/mssql/schema/tablecompiler.js -> lib/dialects/mssql/schema/tablecompiler.js
src/dialects/mssql/transaction.js -> lib/dialects/mssql/transaction.js
src/dialects/mysql/index.js -> lib/dialects/mysql/index.js
src/dialects/mysql/query/compiler.js -> lib/dialects/mysql/query/compiler.js
src/dialects/mysql/schema/columncompiler.js -> lib/dialects/mysql/schema/columncompiler.js
src/dialects/mysql/schema/compiler.js -> lib/dialects/mysql/schema/compiler.js
src/dialects/mysql/schema/tablecompiler.js -> lib/dialects/mysql/schema/tablecompiler.js
src/dialects/mysql/transaction.js -> lib/dialects/mysql/transaction.js
src/dialects/mysql2/index.js -> lib/dialects/mysql2/index.js
src/dialects/mysql2/transaction.js -> lib/dialects/mysql2/transaction.js
src/dialects/oracle/formatter.js -> lib/dialects/oracle/formatter.js
src/dialects/oracle/index.js -> lib/dialects/oracle/index.js
src/dialects/oracle/query/compiler.js -> lib/dialects/oracle/query/compiler.js
src/dialects/oracle/schema/columnbuilder.js -> lib/dialects/oracle/schema/columnbuilder.js
src/dialects/oracle/schema/columncompiler.js -> lib/dialects/oracle/schema/columncompiler.js
src/dialects/oracle/schema/compiler.js -> lib/dialects/oracle/schema/compiler.js
src/dialects/oracle/schema/tablecompiler.js -> lib/dialects/oracle/schema/tablecompiler.js
src/dialects/oracle/stream.js -> lib/dialects/oracle/stream.js
src/dialects/oracle/transaction.js -> lib/dialects/oracle/transaction.js
src/dialects/oracle/utils.js -> lib/dialects/oracle/utils.js
src/dialects/postgres/index.js -> lib/dialects/postgres/index.js
src/dialects/postgres/query/compiler.js -> lib/dialects/postgres/query/compiler.js
src/dialects/postgres/query/string.js -> lib/dialects/postgres/query/string.js
src/dialects/postgres/schema/columncompiler.js -> lib/dialects/postgres/schema/columncompiler.js
src/dialects/postgres/schema/compiler.js -> lib/dialects/postgres/schema/compiler.js
src/dialects/postgres/schema/tablecompiler.js -> lib/dialects/postgres/schema/tablecompiler.js
src/dialects/postgres/utils.js -> lib/dialects/postgres/utils.js
src/dialects/sqlite3/index.js -> lib/dialects/sqlite3/index.js
src/dialects/sqlite3/query/compiler.js -> lib/dialects/sqlite3/query/compiler.js
src/dialects/sqlite3/schema/columncompiler.js -> lib/dialects/sqlite3/schema/columncompiler.js
src/dialects/sqlite3/schema/compiler.js -> lib/dialects/sqlite3/schema/compiler.js
src/dialects/sqlite3/schema/ddl.js -> lib/dialects/sqlite3/schema/ddl.js
src/dialects/sqlite3/schema/tablecompiler.js -> lib/dialects/sqlite3/schema/tablecompiler.js
src/dialects/strong-oracle/index.js -> lib/dialects/strong-oracle/index.js
src/dialects/websql/index.js -> lib/dialects/websql/index.js
src/dialects/websql/transaction.js -> lib/dialects/websql/transaction.js
src/formatter.js -> lib/formatter.js
src/functionhelper.js -> lib/functionhelper.js
src/helpers.js -> lib/helpers.js
src/index.js -> lib/index.js
src/interface.js -> lib/interface.js
src/migrate/index.js -> lib/migrate/index.js
src/migrate/migrate-stub.js -> lib/migrate/migrate-stub.js
src/promise.js -> lib/promise.js
src/query/builder.js -> lib/query/builder.js
src/query/compiler.js -> lib/query/compiler.js
src/query/joinclause.js -> lib/query/joinclause.js
src/query/methods.js -> lib/query/methods.js
src/query/string.js -> lib/query/string.js
src/raw.js -> lib/raw.js
src/runner.js -> lib/runner.js
src/schema/builder.js -> lib/schema/builder.js
src/schema/columnbuilder.js -> lib/schema/columnbuilder.js
src/schema/columncompiler.js -> lib/schema/columncompiler.js
src/schema/compiler.js -> lib/schema/compiler.js
src/schema/helpers.js -> lib/schema/helpers.js
src/schema/tablebuilder.js -> lib/schema/tablebuilder.js
src/schema/tablecompiler.js -> lib/schema/tablecompiler.js
src/seed/index.js -> lib/seed/index.js
src/seed/seed-stub.js -> lib/seed/seed-stub.js
src/statement.js -> lib/statement.js
src/transaction.js -> lib/transaction.js
src/util/bluebird.js -> lib/util/bluebird.js
src/util/make-client.js -> lib/util/make-client.js
src/util/make-knex.js -> lib/util/make-knex.js
src/util/noop.js -> lib/util/noop.js
src/util/parse-connection.js -> lib/util/parse-connection.js
Hash: 0d1a5f763be024c24f86
Version: webpack 1.8.11
Time: 1343ms
  Asset     Size  Chunks             Chunk Names
knex.js  1.37 MB       0  [emitted]  main
   [0] ./tmp/lib/index.js 1.85 kB {0} [built]
   [1] ./tmp/lib/raw.js 3.78 kB {0} [built]
   [2] ./tmp/lib/helpers.js 1.16 kB {0} [built]
   [3] ./tmp/lib/client.js 7.75 kB {0} [built]
   [4] ./tmp/lib/util/make-client.js 2.21 kB {0} [built]
   [5] ./tmp/lib/util/make-knex.js 2.85 kB {0} [built]
   [6] ./tmp/lib/util/parse-connection.js 1.59 kB {0} [built]
   [7] ./tmp/lib/dialects ^\.\/.*\/index\.js$ 365 bytes {0} [built]
   [8] ./tmp/lib/promise.js 373 bytes {0} [built]
   [9] ./tmp/lib/dialects/websql/index.js 3.23 kB {0} [built]
  [12] ./tmp/lib/interface.js 2.68 kB {0} [built]
  [13] ./tmp/lib/runner.js 4.72 kB {0} [built]
  [14] ./tmp/lib/formatter.js 5.47 kB {0} [built]
  [15] ./tmp/lib/transaction.js 8.42 kB {0} [built]
  [16] ./tmp/lib/query/builder.js 23.3 kB {0} [built]
  [17] ./tmp/lib/query/compiler.js 13.9 kB {0} [built]
  [18] ./tmp/lib/schema/builder.js 1.52 kB {0} [built]
  [19] ./tmp/lib/schema/compiler.js 1.88 kB {0} [built]
  [20] ./tmp/lib/schema/tablebuilder.js 6.17 kB {0} [built]
  [21] ./tmp/lib/schema/tablecompiler.js 7.54 kB {0} [built]
  [22] ./tmp/lib/schema/columnbuilder.js 2.64 kB {0} [built]
  [23] ./tmp/lib/schema/columncompiler.js 4.64 kB {0} [built]
  [24] ./tmp/lib/util/noop.js 47 bytes {0} [built]
  [25] ./tmp/lib/query/string.js 3.21 kB {0} [built]
  [26] ./tmp/lib/functionhelper.js 234 bytes {0} [built]
  [27] ./tmp/lib/query/methods.js 1.12 kB {0} [built]
  [33] ./tmp/lib/util/bluebird.js 169 bytes {0} [built]
  [34] ./tmp/lib/dialects/maria/index.js 4.21 kB {0} [optional] [built]
  [35] ./tmp/lib/dialects/mssql/index.js 6.13 kB {0} [optional] [built] [1 error]
  [36] ./tmp/lib/dialects/mysql/index.js 4.22 kB {0} [built]
  [37] ./tmp/lib/dialects/mysql2/index.js 2.14 kB {0} [optional] [built]
  [38] ./tmp/lib/dialects/oracle/index.js 5.37 kB {0} [built]
  [39] ./tmp/lib/dialects/postgres/index.js 6.33 kB {0} [optional] [built]
  [40] ./tmp/lib/dialects/sqlite3/index.js 4.73 kB {0} [built]
  [41] ./tmp/lib/dialects/strong-oracle/index.js 438 bytes {0} [optional] [built]
  [42] ./tmp/lib/dialects/websql/transaction.js 1.47 kB {0} [built]
  [59] ./tmp/lib/query/joinclause.js 2.28 kB {0} [built]
  [62] ./tmp/lib/schema/helpers.js 792 bytes {0} [built]
  [76] ./tmp/lib/dialects/maria/transaction.js 1.09 kB {0} [built]
  [77] ./tmp/lib/dialects/mysql/transaction.js 1.09 kB {0} [built]
  [78] ./tmp/lib/dialects/mysql/query/compiler.js 2.28 kB {0} [built]
  [79] ./tmp/lib/dialects/mysql/schema/compiler.js 1.22 kB {0} [built]
  [80] ./tmp/lib/dialects/mysql/schema/tablecompiler.js 7 kB {0} [built]
  [81] ./tmp/lib/dialects/mysql/schema/columncompiler.js 2.71 kB {0} [built]
  [82] ./tmp/lib/dialects/mssql/formatter.js 698 bytes {0} [built]
  [83] ./tmp/lib/dialects/mssql/transaction.js 2.78 kB {0} [built]
  [84] ./tmp/lib/dialects/mssql/query/compiler.js 5.8 kB {0} [built]
  [85] ./tmp/lib/dialects/mssql/schema/compiler.js 1.75 kB {0} [built]
  [86] ./tmp/lib/dialects/mssql/schema/tablecompiler.js 4.86 kB {0} [built]
  [87] ./tmp/lib/dialects/mssql/schema/columncompiler.js 2.35 kB {0} [built]
  [89] ./tmp/lib/dialects/mysql2/transaction.js 1.11 kB {0} [built]
  [90] ./tmp/lib/dialects/oracle/formatter.js 875 bytes {0} [built]
  [91] ./tmp/lib/dialects/oracle/transaction.js 1.65 kB {0} [built]
  [92] ./tmp/lib/dialects/oracle/query/compiler.js 8.05 kB {0} [built]
  [93] ./tmp/lib/dialects/oracle/schema/compiler.js 2.3 kB {0} [built]
  [94] ./tmp/lib/dialects/oracle/schema/columnbuilder.js 563 bytes {0} [built]
  [95] ./tmp/lib/dialects/oracle/schema/columncompiler.js 4.21 kB {0} [built]
  [96] ./tmp/lib/dialects/oracle/schema/tablecompiler.js 3.85 kB {0} [built]
  [97] ./tmp/lib/dialects/oracle/stream.js 1.32 kB {0} [built]
  [98] ./tmp/lib/dialects/oracle/utils.js 1.35 kB {0} [built]
  [99] ./tmp/lib/dialects/postgres/utils.js 2.67 kB {0} [built]
 [100] ./tmp/lib/dialects/postgres/query/compiler.js 2.95 kB {0} [built]
 [101] ./tmp/lib/dialects/postgres/schema/columncompiler.js 2.01 kB {0} [built]
 [102] ./tmp/lib/dialects/postgres/schema/tablecompiler.js 3.25 kB {0} [built]
 [103] ./tmp/lib/dialects/postgres/schema/compiler.js 3.03 kB {0} [built]
 [104] ./tmp/lib/dialects/postgres/query/string.js 1.21 kB {0} [built]
 [105] ./tmp/lib/dialects/sqlite3/query/compiler.js 3.7 kB {0} [built]
 [106] ./tmp/lib/dialects/sqlite3/schema/compiler.js 1.25 kB {0} [built]
 [107] ./tmp/lib/dialects/sqlite3/schema/columncompiler.js 580 bytes {0} [built]
 [108] ./tmp/lib/dialects/sqlite3/schema/tablecompiler.js 4.47 kB {0} [built]
 [109] ./tmp/lib/dialects/sqlite3/schema/ddl.js 7.09 kB {0} [built]
    + 286 hidden modules

WARNING in ./~/mssql/lib/tds-fix.js
Module not found: Error: Cannot resolve module 'tds/package.json' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/mssql/lib
 @ ./~/mssql/lib/tds-fix.js 6:8-35

WARNING in ./~/mssql/lib/tds-fix.js
Module not found: Error: Cannot resolve module 'tds/lib/tds-constants.js' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/mssql/lib
 @ ./~/mssql/lib/tds-fix.js 13:4-39

WARNING in ./~/mssql/lib/tds-fix.js
Module not found: Error: Cannot resolve module 'tds' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/mssql/lib
 @ ./~/mssql/lib/tds-fix.js 14:4-18

WARNING in ./~/tedious/package.json
Module parse failed: /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/tedious/package.json Line 2: Unexpected token :
You may need an appropriate loader to handle this file type.
| {
|   "_args": [
|     [
|       "tedious@~1.13.1",
 @ ./~/mssql/lib/tedious-fix.js 14:8-39

ERROR in ./tmp/lib/dialects/mssql/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./query/joinclause in /Users/mikaelle/Projects/Vincit/temp/knex/tmp/lib/dialects/mssql
 @ ./tmp/lib/dialects/mssql/index.js 17:17-46

ERROR in ./~/mssql/lib/main.js
Module not found: Error: Cannot resolve module 'fs' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/mssql/lib
 @ ./~/mssql/lib/main.js 13:7-20

ERROR in ./~/mssql/lib/cli.js
Module not found: Error: Cannot resolve module 'fs' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/mssql/lib
 @ ./~/mssql/lib/cli.js 5:7-20

ERROR in ./~/mssql/lib/tds.js
Module not found: Error: Cannot resolve module 'tds' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/mssql/lib
 @ ./~/mssql/lib/tds.js 9:8-22

ERROR in ./~/mssql/lib/msnodesql.js
Module not found: Error: Cannot resolve module 'msnodesql' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/mssql/lib
 @ ./~/mssql/lib/msnodesql.js 9:14-34

ERROR in ./~/tedious/lib/connection.js
Module not found: Error: Cannot resolve module 'net' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/tedious/lib
 @ ./~/tedious/lib/connection.js 61:11-25

ERROR in ./~/tedious/lib/instance-lookup.js
Module not found: Error: Cannot resolve module 'dgram' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/tedious/lib
 @ ./~/tedious/lib/instance-lookup.js 11:13-29

ERROR in ./~/tedious/lib/message-io.js
Module not found: Error: Cannot resolve module 'tls' in /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/tedious/lib
 @ ./~/tedious/lib/message-io.js 17:11-25

ERROR in ./~/iconv-lite/encodings/tables/gb18030-ranges.json
Module parse failed: /Users/mikaelle/Projects/Vincit/temp/knex/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json Line 1: Unexpected token :
You may need an appropriate loader to handle this file type.
| {"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}
 @ ./~/iconv-lite/encodings/dbcs-data.js 99:37-76
Mikaels-MacBook-Pro:knex mikaelle$ 
@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 15, 2015

This is happening because your do not have the new dependency of mssql.

Please try running npm install to reinstall any dependencies.

@elhigu

This comment has been minimized.

Collaborator

elhigu commented Dec 15, 2015

Related issue #240

@Grimace1975 as you can see from the listing from my comment, that I took fresh clone from the knex repo and did run npm install before running npm run build...

Now I did run it again after you merged your latest pull request, but I still get one error:

ERROR in ./tmp/lib/dialects/mssql/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./query/joinclause in /Users/mikaelle/Projects/Vincit/temp/knex/tmp/lib/dialects/mssql
 @ ./tmp/lib/dialects/mssql/index.js 17:17-46

Are you sure you have committed all files including src/dialects/mssql/query/joinclause.js ?

Mikaels-MacBook-Pro:temp mikaelle$ rm -fr knex/
Mikaels-MacBook-Pro:temp mikaelle$ git clone https://github.com/tgriesser/knex.git
Cloning into 'knex'...
remote: Counting objects: 11011, done.
remote: Compressing objects: 100% (182/182), done.
knexeceiving objects:  12% (1349/11011), 348.01 KiB | 180.00 KiB/s   
 installReceiving objects:  22% (2423/11011), 1.23 MiB | 212.00 KiB/s   
remote: Total 11011 (delta 110), reused 0 (delta 0), pack-reused 10823
Receiving objects: 100% (11011/11011), 5.68 MiB | 370.00 KiB/s, done.
Resolving deltas: 100% (6741/6741), done.
Checking connectivity... done.
Mikaels-MacBook-Pro:temp mikaelle$ cd knex
Mikaels-MacBook-Pro:knex mikaelle$ npm install

... npm install stuff ...

Mikaels-MacBook-Pro:knex mikaelle$ npm run build

> knex@0.9.0 build /Users/mikaelle/Projects/Vincit/temp/knex
> ./scripts/build.sh

knex@0.9.0 /Users/mikaelle/Projects/Vincit/temp/knex
├─┬ istanbul@0.3.22
│ ├─┬ escodegen@1.7.1
│ │ └── esprima@1.2.5 
│ └─┬ handlebars@4.0.5
│   ├── source-map@0.4.4 
│   └─┬ uglify-js@2.6.1
│     ├── async@0.2.10 
│     └─┬ yargs@3.10.0
│       └── window-size@0.1.0 
├─┬ sqlite3@3.1.1
│ └─┬ node-pre-gyp@0.6.14
│   └─┬ tar-pack@2.0.0
│     └─┬ fstream@0.1.31
│       └── graceful-fs@3.0.8 
└── webpack@1.8.11  extraneous

src/bin/cli.js -> lib/bin/cli.js
src/client.js -> lib/client.js
src/connection/index.js -> lib/connection/index.js
src/dialects/maria/index.js -> lib/dialects/maria/index.js
src/dialects/maria/transaction.js -> lib/dialects/maria/transaction.js
src/dialects/mssql/formatter.js -> lib/dialects/mssql/formatter.js
src/dialects/mssql/index.js -> lib/dialects/mssql/index.js
src/dialects/mssql/query/compiler.js -> lib/dialects/mssql/query/compiler.js
src/dialects/mssql/schema/columncompiler.js -> lib/dialects/mssql/schema/columncompiler.js
src/dialects/mssql/schema/compiler.js -> lib/dialects/mssql/schema/compiler.js
src/dialects/mssql/schema/tablecompiler.js -> lib/dialects/mssql/schema/tablecompiler.js
src/dialects/mssql/transaction.js -> lib/dialects/mssql/transaction.js
src/dialects/mysql/index.js -> lib/dialects/mysql/index.js
src/dialects/mysql/query/compiler.js -> lib/dialects/mysql/query/compiler.js
src/dialects/mysql/schema/columncompiler.js -> lib/dialects/mysql/schema/columncompiler.js
src/dialects/mysql/schema/compiler.js -> lib/dialects/mysql/schema/compiler.js
src/dialects/mysql/schema/tablecompiler.js -> lib/dialects/mysql/schema/tablecompiler.js
src/dialects/mysql/transaction.js -> lib/dialects/mysql/transaction.js
src/dialects/mysql2/index.js -> lib/dialects/mysql2/index.js
src/dialects/mysql2/transaction.js -> lib/dialects/mysql2/transaction.js
src/dialects/oracle/formatter.js -> lib/dialects/oracle/formatter.js
src/dialects/oracle/index.js -> lib/dialects/oracle/index.js
src/dialects/oracle/query/compiler.js -> lib/dialects/oracle/query/compiler.js
src/dialects/oracle/schema/columnbuilder.js -> lib/dialects/oracle/schema/columnbuilder.js
src/dialects/oracle/schema/columncompiler.js -> lib/dialects/oracle/schema/columncompiler.js
src/dialects/oracle/schema/compiler.js -> lib/dialects/oracle/schema/compiler.js
src/dialects/oracle/schema/tablecompiler.js -> lib/dialects/oracle/schema/tablecompiler.js
src/dialects/oracle/stream.js -> lib/dialects/oracle/stream.js
src/dialects/oracle/transaction.js -> lib/dialects/oracle/transaction.js
src/dialects/oracle/utils.js -> lib/dialects/oracle/utils.js
src/dialects/postgres/index.js -> lib/dialects/postgres/index.js
src/dialects/postgres/query/compiler.js -> lib/dialects/postgres/query/compiler.js
src/dialects/postgres/query/string.js -> lib/dialects/postgres/query/string.js
src/dialects/postgres/schema/columncompiler.js -> lib/dialects/postgres/schema/columncompiler.js
src/dialects/postgres/schema/compiler.js -> lib/dialects/postgres/schema/compiler.js
src/dialects/postgres/schema/tablecompiler.js -> lib/dialects/postgres/schema/tablecompiler.js
src/dialects/postgres/utils.js -> lib/dialects/postgres/utils.js
src/dialects/sqlite3/index.js -> lib/dialects/sqlite3/index.js
src/dialects/sqlite3/query/compiler.js -> lib/dialects/sqlite3/query/compiler.js
src/dialects/sqlite3/schema/columncompiler.js -> lib/dialects/sqlite3/schema/columncompiler.js
src/dialects/sqlite3/schema/compiler.js -> lib/dialects/sqlite3/schema/compiler.js
src/dialects/sqlite3/schema/ddl.js -> lib/dialects/sqlite3/schema/ddl.js
src/dialects/sqlite3/schema/tablecompiler.js -> lib/dialects/sqlite3/schema/tablecompiler.js
src/dialects/strong-oracle/index.js -> lib/dialects/strong-oracle/index.js
src/dialects/websql/index.js -> lib/dialects/websql/index.js
src/dialects/websql/transaction.js -> lib/dialects/websql/transaction.js
src/formatter.js -> lib/formatter.js
src/functionhelper.js -> lib/functionhelper.js
src/helpers.js -> lib/helpers.js
src/index.js -> lib/index.js
src/interface.js -> lib/interface.js
src/migrate/index.js -> lib/migrate/index.js
src/migrate/migrate-stub.js -> lib/migrate/migrate-stub.js
src/promise.js -> lib/promise.js
src/query/builder.js -> lib/query/builder.js
src/query/compiler.js -> lib/query/compiler.js
src/query/joinclause.js -> lib/query/joinclause.js
src/query/methods.js -> lib/query/methods.js
src/query/string.js -> lib/query/string.js
src/raw.js -> lib/raw.js
src/runner.js -> lib/runner.js
src/schema/builder.js -> lib/schema/builder.js
src/schema/columnbuilder.js -> lib/schema/columnbuilder.js
src/schema/columncompiler.js -> lib/schema/columncompiler.js
src/schema/compiler.js -> lib/schema/compiler.js
src/schema/helpers.js -> lib/schema/helpers.js
src/schema/tablebuilder.js -> lib/schema/tablebuilder.js
src/schema/tablecompiler.js -> lib/schema/tablecompiler.js
src/seed/index.js -> lib/seed/index.js
src/seed/seed-stub.js -> lib/seed/seed-stub.js
src/statement.js -> lib/statement.js
src/transaction.js -> lib/transaction.js
src/util/bluebird.js -> lib/util/bluebird.js
src/util/make-client.js -> lib/util/make-client.js
src/util/make-knex.js -> lib/util/make-knex.js
src/util/noop.js -> lib/util/noop.js
src/util/parse-connection.js -> lib/util/parse-connection.js
Hash: 7edf6195005a696ee255
Version: webpack 1.8.11
Time: 826ms
  Asset    Size  Chunks             Chunk Names
knex.js  618 kB       0  [emitted]  main
   [0] ./tmp/lib/index.js 1.85 kB {0} [built]
   [1] ./tmp/lib/raw.js 3.78 kB {0} [built]
   [2] ./tmp/lib/helpers.js 1.16 kB {0} [built]
   [3] ./tmp/lib/client.js 7.75 kB {0} [built]
   [4] ./tmp/lib/util/make-client.js 2.21 kB {0} [built]
   [5] ./tmp/lib/util/make-knex.js 2.85 kB {0} [built]
   [6] ./tmp/lib/util/parse-connection.js 1.59 kB {0} [built]
   [7] ./tmp/lib/dialects ^\.\/.*\/index\.js$ 365 bytes {0} [built]
   [8] ./tmp/lib/promise.js 373 bytes {0} [built]
   [9] ./tmp/lib/dialects/websql/index.js 3.23 kB {0} [built]
  [12] ./tmp/lib/interface.js 2.68 kB {0} [built]
  [13] ./tmp/lib/runner.js 4.72 kB {0} [built]
  [14] ./tmp/lib/formatter.js 5.47 kB {0} [built]
  [15] ./tmp/lib/transaction.js 8.42 kB {0} [built]
  [16] ./tmp/lib/query/builder.js 23.3 kB {0} [built]
  [17] ./tmp/lib/query/compiler.js 13.9 kB {0} [built]
  [18] ./tmp/lib/schema/builder.js 1.52 kB {0} [built]
  [19] ./tmp/lib/schema/compiler.js 1.88 kB {0} [built]
  [20] ./tmp/lib/schema/tablebuilder.js 6.17 kB {0} [built]
  [21] ./tmp/lib/schema/tablecompiler.js 7.54 kB {0} [built]
  [22] ./tmp/lib/schema/columnbuilder.js 2.64 kB {0} [built]
  [23] ./tmp/lib/schema/columncompiler.js 4.64 kB {0} [built]
  [24] ./tmp/lib/util/noop.js 47 bytes {0} [built]
  [25] ./tmp/lib/query/string.js 3.21 kB {0} [built]
  [26] ./tmp/lib/functionhelper.js 234 bytes {0} [built]
  [27] ./tmp/lib/query/methods.js 1.12 kB {0} [built]
  [33] ./tmp/lib/util/bluebird.js 169 bytes {0} [built]
  [34] ./tmp/lib/dialects/maria/index.js 4.21 kB {0} [optional] [built]
  [35] ./tmp/lib/dialects/mssql/index.js 6.13 kB {0} [optional] [built] [1 error]
  [36] ./tmp/lib/dialects/mysql/index.js 4.22 kB {0} [built]
  [37] ./tmp/lib/dialects/mysql2/index.js 2.14 kB {0} [optional] [built]
  [38] ./tmp/lib/dialects/oracle/index.js 5.37 kB {0} [built]
  [39] ./tmp/lib/dialects/postgres/index.js 6.33 kB {0} [optional] [built]
  [40] ./tmp/lib/dialects/sqlite3/index.js 4.73 kB {0} [built]
  [41] ./tmp/lib/dialects/strong-oracle/index.js 438 bytes {0} [optional] [built]
  [42] ./tmp/lib/dialects/websql/transaction.js 1.47 kB {0} [built]
  [60] ./tmp/lib/query/joinclause.js 2.28 kB {0} [built]
  [63] ./tmp/lib/schema/helpers.js 792 bytes {0} [built]
  [77] ./tmp/lib/dialects/maria/transaction.js 1.09 kB {0} [built]
  [78] ./tmp/lib/dialects/mssql/formatter.js 698 bytes {0} [built]
  [79] ./tmp/lib/dialects/mssql/transaction.js 2.78 kB {0} [built]
  [80] ./tmp/lib/dialects/mssql/query/compiler.js 6.08 kB {0} [built]
  [81] ./tmp/lib/dialects/mssql/schema/compiler.js 1.75 kB {0} [built]
  [82] ./tmp/lib/dialects/mssql/schema/tablecompiler.js 4.86 kB {0} [built]
  [83] ./tmp/lib/dialects/mssql/schema/columncompiler.js 2.35 kB {0} [built]
  [84] ./tmp/lib/dialects/mysql/transaction.js 1.09 kB {0} [built]
  [85] ./tmp/lib/dialects/mysql/query/compiler.js 2.28 kB {0} [built]
  [86] ./tmp/lib/dialects/mysql/schema/compiler.js 1.22 kB {0} [built]
  [87] ./tmp/lib/dialects/mysql/schema/tablecompiler.js 7 kB {0} [built]
  [88] ./tmp/lib/dialects/mysql/schema/columncompiler.js 2.71 kB {0} [built]
  [90] ./tmp/lib/dialects/mysql2/transaction.js 1.11 kB {0} [built]
  [91] ./tmp/lib/dialects/postgres/utils.js 2.67 kB {0} [built]
  [92] ./tmp/lib/dialects/postgres/query/compiler.js 2.95 kB {0} [built]
  [93] ./tmp/lib/dialects/postgres/schema/columncompiler.js 2.01 kB {0} [built]
  [94] ./tmp/lib/dialects/postgres/schema/tablecompiler.js 3.25 kB {0} [built]
  [95] ./tmp/lib/dialects/postgres/schema/compiler.js 3.03 kB {0} [built]
  [96] ./tmp/lib/dialects/postgres/query/string.js 1.21 kB {0} [built]
  [97] ./tmp/lib/dialects/oracle/formatter.js 875 bytes {0} [built]
  [98] ./tmp/lib/dialects/oracle/transaction.js 1.65 kB {0} [built]
  [99] ./tmp/lib/dialects/oracle/query/compiler.js 8.05 kB {0} [built]
 [100] ./tmp/lib/dialects/oracle/schema/compiler.js 2.3 kB {0} [built]
 [101] ./tmp/lib/dialects/oracle/schema/columnbuilder.js 563 bytes {0} [built]
 [102] ./tmp/lib/dialects/oracle/schema/columncompiler.js 4.21 kB {0} [built]
 [103] ./tmp/lib/dialects/oracle/schema/tablecompiler.js 3.85 kB {0} [built]
 [104] ./tmp/lib/dialects/oracle/stream.js 1.32 kB {0} [built]
 [105] ./tmp/lib/dialects/oracle/utils.js 1.35 kB {0} [built]
 [106] ./tmp/lib/dialects/sqlite3/query/compiler.js 3.7 kB {0} [built]
 [107] ./tmp/lib/dialects/sqlite3/schema/compiler.js 1.25 kB {0} [built]
 [108] ./tmp/lib/dialects/sqlite3/schema/columncompiler.js 580 bytes {0} [built]
 [109] ./tmp/lib/dialects/sqlite3/schema/tablecompiler.js 4.47 kB {0} [built]
 [110] ./tmp/lib/dialects/sqlite3/schema/ddl.js 7.09 kB {0} [built]
    + 152 hidden modules

ERROR in ./tmp/lib/dialects/mssql/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./query/joinclause in /Users/mikaelle/Projects/Vincit/temp/knex/tmp/lib/dialects/mssql
 @ ./tmp/lib/dialects/mssql/index.js 17:17-46
@tgriesser

This comment has been minimized.

Owner

tgriesser commented Dec 16, 2015

@elhigu I pushed a commit to fix this

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 16, 2015

@elhigu, @tgriesser
this should have been fixed with my last push. i was including a file which didnt get built.

@elhigu

This comment has been minimized.

Collaborator

elhigu commented Dec 17, 2015

@tgriesser @Grimace1975 Just tested it out again. No more errors there 🎉

@crowebird

This comment has been minimized.

crowebird commented Dec 17, 2015

@Grimace1975 it appears you are binding the limit (TOP) variable.

e.g. query().select().limit(1) = catch => select top @p0 * from [mytable] - Incorrect syntax near '@p0'.

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 17, 2015

@crowebird
"select top (@p0) * from [mytable]" is the correct syntax which is in the latest version. please pull and try again

@crowebird

This comment has been minimized.

crowebird commented Dec 17, 2015

@Grimace1975

Hmm mssql 2014.. the bind works in the where clause, just not working for TOP

{ [RequestError: select top @p0 * from [mytable] - Incorrect syntax near '@p0'.]
name: 'RequestError',
message: 'select top @p0 * from [mytable] - Incorrect syntax near '@p0'.',
code: 'EREQUEST',
number: 102,
lineNumber: 1,
state: 1,
class: 15,
serverName: '<>',
procName: '',
precedingErrors: [] }

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 17, 2015

@crowebird you do not have the latest. the "top @p0" should be "top (@p0)"

@crowebird

This comment has been minimized.

crowebird commented Dec 17, 2015

@Grimace1975 ah my bad was not pointing at your branch let me revert. Thanks for the help and the awesome addition!

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 17, 2015

@crowebird oh my changes have not been pulled in to master on the root branch? i will look into that

@smorey2

This comment has been minimized.

Collaborator

smorey2 commented Dec 17, 2015

@crowebird i am sorry. it should be merged now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment