forked from brianc/node-sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathin.js
More file actions
28 lines (23 loc) · 780 Bytes
/
in.js
File metadata and controls
28 lines (23 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'use strict';
var _ = require('lodash');
var Node = require('./index');
var valueExpressionMixin = require('./valueExpression');
var valueExpressionMixed = false;
var InNode = Node.define(_.extend({
type: 'IN',
constructor: function(config) {
Node.call(this);
this.left = config.left;
this.right = config.right;
// Delay mixin to runtime, when all nodes have been defined, and
// mixin only once. ValueExpressionMixin has circular dependencies.
if (!valueExpressionMixed) {
valueExpressionMixed = true;
_.extend(InNode.prototype, valueExpressionMixin());
}
},
}));
// allow aliasing
var AliasNode = require('./alias');
_.extend(InNode.prototype, AliasNode.AliasMixin);
module.exports = InNode;