2013-09-03 22:25:54 -04:00
|
|
|
(function(define) {
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
define(function(require, exports) {
|
2013-09-03 22:01:31 -04:00
|
|
|
|
|
|
|
var _ = require('underscore');
|
|
|
|
var Common = require('./common').Common;
|
|
|
|
|
|
|
|
var Raw = function(sql, bindings) {
|
|
|
|
this.bindings = (!_.isArray(bindings) ? (bindings ? [bindings] : []) : bindings);
|
|
|
|
this.sql = sql;
|
|
|
|
};
|
|
|
|
|
|
|
|
_.extend(Raw.prototype, {
|
|
|
|
|
|
|
|
_source: 'Raw',
|
|
|
|
|
|
|
|
// Returns the raw sql for the query.
|
|
|
|
toSql: function() {
|
|
|
|
return this.sql;
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
exports.Raw = Raw;
|
2013-09-03 22:25:54 -04:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})(
|
|
|
|
typeof define === 'function' && define.amd ? define : function (factory) { factory(require, exports, module); }
|
|
|
|
);
|