mirror of
https://github.com/knex/knex.git
synced 2025-07-05 08:01:09 +00:00
22 lines
402 B
JavaScript
22 lines
402 B
JavaScript
![]() |
|
||
|
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;
|