不要怂,就是干,撸起袖子干!

Commit 0027dfae by sdepold

index basics are working

1 parent 41bcd2f8
...@@ -185,18 +185,19 @@ var QueryGenerator = module.exports = { ...@@ -185,18 +185,19 @@ var QueryGenerator = module.exports = {
}, },
addIndexQuery: function(tableName, attributes, options) { addIndexQuery: function(tableName, attributes, options) {
// var sql = [ options = Utils._.extend({
// "CREATE <%= indicesType %> INDEX <%= name %>", indicesType: null,
// "<%= indexType %> ON <%= tableName %> <%= columns %>", indexName: Utils._.underscored(tableName + '_' + attributes.join('_')),
// "<%= parser %>" parser: null
// ].join(' ') }, options || {})
// return Utils._.template(sql)({ return Utils._.compact([
// indicesType: options.indicesType || '', "CREATE", options.indicesType || null, "INDEX", options.indexName,
// name: options.indexName, options.indexType ? 'USING ' + options.indexType : undefined,
// indexType: options.indexType ? 'USING ' + options.indexType : undefined, "ON", tableName, attributes.join(', '),
options.parser ? "WITH PARSER " + options.parser : undefined
// }) ]).join(' ')
/* /*
CREATE [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name CREATE [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name
......
...@@ -124,12 +124,12 @@ describe('QueryGenerator', function() { ...@@ -124,12 +124,12 @@ describe('QueryGenerator', function() {
} }
], ],
//'addIndexQuery': [ 'addIndexQuery': [
// { {
// arguments: ['User', ['username', 'isAdmin']], arguments: ['User', ['username', 'isAdmin']],
// expectation: 'CREATE INDEX user_username_is_admin ON User username, isAdmin' expectation: 'CREATE INDEX user_username_is_admin ON User username, isAdmin'
// } }
//], ],
'hashToWhereConditions': [ 'hashToWhereConditions': [
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!