Skip to content

Commit

Permalink
Remove WebSQL dialect (#2647)
Browse files Browse the repository at this point in the history
* Add json support to the query builder for mysql

refs #1036

Based on #1902

* Clarify supported version

* Use native Buffer and Stream implementations

* Remove WebSQL dialect
  • Loading branch information
kibertoad authored and elhigu committed Jun 18, 2018
1 parent 0a0ce35 commit d76cbff
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 176 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@

- Drop support for Node.js 4 and 5
- `json` data type is no longer converted to `text` within a schema builder migration for MySQL databases (note that JSON data type is only supported for MySQL 5.7.8+)
- Removed WebSQL dialect #2461

# 0.14.6 - 12 Apr, 2018

Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -8,7 +8,7 @@

> **A SQL query builder that is _flexible_, _portable_, and _fun_ to use!**
A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle(including Oracle Wallet Authentication), WebSQL) query builder for
A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle(including Oracle Wallet Authentication)) query builder for
Node.js and the Browser, featuring:

- [transactions](http://knexjs.org/#Transactions)
Expand All @@ -24,7 +24,7 @@ Node.js versions 6+ are supported.

For support and questions, join the `#bookshelf` channel on freenode IRC

For an Object Relational Mapper, see:
For an Object Relational Mapper, see:
- http://bookshelfjs.org
- https://github.com/Vincit/objection.js

Expand Down
111 changes: 0 additions & 111 deletions src/dialects/websql/index.js

This file was deleted.

48 changes: 0 additions & 48 deletions src/dialects/websql/transaction.js

This file was deleted.

16 changes: 5 additions & 11 deletions src/index.js
Expand Up @@ -26,7 +26,7 @@ export default function Knex(config) {
} else if (typeof config.client === 'function' && config.client.prototype instanceof Client) {
Dialect = config.client
} else {
const clientName = config.client || config.dialect
const clientName = config.client || config.dialect;
Dialect = require(`./dialects/${aliases[clientName] || clientName}/index.js`)
}
if (typeof config.connection === 'string') {
Expand All @@ -36,7 +36,7 @@ export default function Knex(config) {
}

// Expose Client on the main Knex namespace.
Knex.Client = Client
Knex.Client = Client;

/* eslint no-console:0 */

Expand All @@ -46,7 +46,7 @@ Object.defineProperties(Knex, {
console.warn(
'Knex.VERSION is deprecated, you can get the module version' +
"by running require('knex/package').version"
)
);
return '0.12.6'
}
},
Expand All @@ -56,17 +56,11 @@ Object.defineProperties(Knex, {
return require('bluebird')
}
}
})
});

// Run a "raw" query, though we can't do anything with it other than put
// it in a query statement.
Knex.raw = (sql, bindings) => {
console.warn('global Knex.raw is deprecated, use knex.raw (chain off an initialized knex object)')
return new Raw().set(sql, bindings)
}

// Doing this ensures Browserify works. Still need to figure out
// the best way to do some of this.
if (process.browser) {
require('./dialects/websql/index.js')
}
};
3 changes: 1 addition & 2 deletions src/migrate/migrate-stub.js
@@ -1,8 +1,7 @@

// Stub Migrate:
// Used for now in browser builds, where filesystem access isn't
// available. Maybe we can eventually do websql migrations
// with jsonp and a json migration api.
// available.
const StubMigrate = module.exports = function() {};

import Promise from 'bluebird';
Expand Down
3 changes: 1 addition & 2 deletions src/seed/seed-stub.js
@@ -1,8 +1,7 @@

// Stub Seed:
// Used for now in browser builds, where filesystem access isn't
// available. Maybe we can eventually do websql migrations
// with jsonp and a json migration api.
// available.
const StubSeed = module.exports = function() {};

import Promise from 'bluebird';
Expand Down

0 comments on commit d76cbff

Please sign in to comment.