Skip to content

Commit

Permalink
added an indexPrefix option defaulting to 'idx_'
Browse files Browse the repository at this point in the history
  • Loading branch information
dlandolt committed Feb 9, 2010
1 parent cb93518 commit f36bf7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/store/sql.js
Expand Up @@ -13,6 +13,7 @@ var defineProperty = require("es5-helper").defineProperty;
exports.SQLStore = function(config){
var database = config.database || exports.defaultDatabase();
var idColumn = config.idColumn || "id";
config.indexPrefix = config.indexPrefix || "idx_";
var store = {
indexedProperties: {id: true},
selectColumns: ["*"],
Expand Down Expand Up @@ -175,6 +176,9 @@ exports.SQLStore = function(config){
results.totalCount = results.length;
return results;
},
executeSql: function(sql, parameters){
return database.executeSql(sql, parameters);
},
setSchema: function(schema) {
for(var i in schema.properties) {
if (schema.properties[i].index) {
Expand Down Expand Up @@ -206,9 +210,6 @@ exports.SQLStore = function(config){
return schema;
}
return {properties:{}};
},
executeSql: function(sql, parameters){
return database.executeSql(sql, parameters);
}
};
for(var i in config){
Expand Down

0 comments on commit f36bf7c

Please sign in to comment.