@@ -4,19 +4,17 @@ var sliced = require('sliced');
44var FunctionCall = require ( __dirname + '/node/functionCall' ) ;
55
66// create a function that creates a function call of the specific name, using the specified sql instance
7- var getFunctionCallCreator = function ( name , sql ) {
7+ var getFunctionCallCreator = function ( name ) {
88 return function ( ) {
99 // turn array-like arguments object into a true array
10- var functionCall = new FunctionCall ( name , sliced ( arguments ) ) ;
11- functionCall . sql = sql ;
12- return functionCall ;
10+ return new FunctionCall ( name , sliced ( arguments ) ) ;
1311 } ;
1412} ;
1513
1614// creates a hash of functions for a sql instance
17- var getFunctions = function ( functionNames , sql ) {
15+ var getFunctions = function ( functionNames ) {
1816 var functions = _ . reduce ( functionNames , function ( reducer , name ) {
19- reducer [ name ] = getFunctionCallCreator ( name , sql ) ;
17+ reducer [ name ] = getFunctionCallCreator ( name ) ;
2018 return reducer ;
2119 } , { } ) ;
2220 return functions ;
@@ -56,8 +54,8 @@ var textsearchFunctions = ['TS_RANK','TS_RANK_CD', 'PLAINTO_TSQUERY', 'TO_TSQUER
5654var standardFunctionNames = aggregateFunctions . concat ( scalarFunctions ) . concat ( hstoreFunction ) . concat ( textsearchFunctions ) ;
5755
5856// creates a hash of standard functions for a sql instance
59- var getStandardFunctions = function ( sql ) {
60- return getFunctions ( standardFunctionNames , sql ) ;
57+ var getStandardFunctions = function ( ) {
58+ return getFunctions ( standardFunctionNames ) ;
6159} ;
6260
6361module . exports . getStandardFunctions = getStandardFunctions ;
0 commit comments