Skip to content

Commit de4fb98

Browse files
author
Paul Winkler
committed
add beginnings for sqlite dialect
1 parent edb19ca commit de4fb98

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

lib/dialect/sqlite.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict';
2+
3+
var util = require('util');
4+
5+
var Sqlite = function() {
6+
this.output = [];
7+
this.params = [];
8+
};
9+
10+
util.inherits(Sqlite, require(__dirname + '/mysql'));
11+
12+
Sqlite.prototype._quoteCharacter = '"';
13+
14+
Sqlite.prototype.visitRenameColumn = function(renameColumn) {
15+
throw new Error(' (CHANGE COLUMN statements require a dataType)');
16+
};
17+
18+
19+
module.exports = Sqlite;

lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ var sql = {
1919
case 'mysql':
2020
this.dialect = require(__dirname + '/dialect/mysql');
2121
break;
22+
case 'sqlite':
23+
this.dialect = require(__dirname + '/dialect/sqlite');
24+
break;
2225
default:
2326
throw new Error(dialect + ' is unsupported');
2427
}

0 commit comments

Comments
 (0)