function IsFunctionSQL( )
431416
static private function ContainsSpace( 
                            string $str
    ) : bool {		
    
        $ret = false;
    
        for ( $i = 0; $i < strlen( $str ); $i++ ) {
            if ( ctype_space( substr( $str, $i, 1 ) ) ) {
                $ret = true;
                break;
            }
        }
        
        return $ret;
    
    }
889433
private String getSQLCondition(Function atom, AliasIndex index) {
		Predicate functionSymbol = atom.getFunctionSymbol();
		if (operations.containsKey(functionSymbol)) {
			String expressionFormat = operations.get(functionSymbol);
			if (functionSymbol.getArity() == 1) {
				// For unary boolean operators, e.g., NOT, IS NULL, IS NOT NULL.
				Term term = atom.getTerm(0);
				final String arg;
				if (functionSymbol == ExpressionOperation.NOT) {
					arg = (term instanceof Function && ((Function) term).isDataTypeFunction())
							? effectiveBooleanValue(term, index)
							: getSQLString(term, index, false);
				}
				else {
					arg = getSQLString(term, index, false);
				}
				return String.format(expressionFormat, arg);
			}
			else if (functionSymbol.getArity() == 2) {
				// For binary boolean operators, e.g., AND, OR, EQ, GT, LT, etc.
				String left = getSQLString(atom.getTerm(0), index, true);
				String right = getSQLString(atom.getTerm(1), index, true);
				return String.format(inBrackets(expressionFormat), left, right);
			}
		}
		else if (functionSymbol == ExpressionOperation.IS_TRUE) {
			return effectiveBooleanValue(atom.getTerm(0), index);
		}
		else if (functionSymbol == ExpressionOperation.REGEX) {
			boolean caseinSensitive = false, multiLine = false, dotAllMode = false;
			if (atom.getArity() == 3) {
				String options = atom.getTerm(2).toString();
				caseinSensitive = options.contains("i");
				multiLine = options.contains("m");
				dotAllMode = options.contains("s");
			}
			String column = getSQLString(atom.getTerm(0), index, false);
			String pattern = getSQLString(atom.getTerm(1), index, false);
			return sqladapter.sqlRegex(column, pattern, caseinSensitive, multiLine, dotAllMode);
		}

		throw new RuntimeException("The builtin function " + functionSymbol + " is not supported yet!");
	}
1303486
function isSqlQuery(literal) {
  if (!literal) {
    return false;
  }

  try {
    parser.parse(literal);
  } catch (error) {
    return false;
  }

  return true;
}
1150675
static public function isInternalFunction($functionName)
    {
        $functionName = strtolower($functionName);

        return isset(self::$_STRING_FUNCTIONS[$functionName])
            || isset(self::$_DATETIME_FUNCTIONS[$functionName])
            || isset(self::$_NUMERIC_FUNCTIONS[$functionName]);
    }
1370474
public static function isFunctionBlacklistedInSuhosin($function)
    {
        if (!extension_loaded('suhosin')) {
            return false;
        }

        if (!isset(self::$blackListSuhosin)) {
            self::$blackListSuhosin = static::prepareList(ini_get('suhosin.executor.func.blacklist'));
        }

        return static::isFunctionsMentionedInList($function, self::$blackListSuhosin);
    }
78310
function(db) {
		function check_javascript_function(js, plv8, ERROR) {
			var fun;
			try {
				// We'll check only positive input
				if(js) {
					fun = (new Function('return (' + js + ')'))();
					if(! (fun && (fun instanceof Function)) ) {
						throw TypeError("Input is not valid JavaScript function: " + (typeof fun) + ": " + fun);
					}
				}
			} catch (e) {
				plv8.elog(ERROR, e);
				return false;
			}
			return true;
		}
		return db.query('CREATE OR REPLACE FUNCTION check_javascript_function(js text) RETURNS boolean LANGUAGE plv8 VOLATILE AS ' + NoPg._escapeFunction(check_javascript_function, ['js', 'plv8', 'ERROR']));
	}
1041507
public static <V> V sqlExecute(final SqlFunction<V> functional)
   {
      return new SqlClosure<V>() {
         @Override
         public V execute(Connection connection) throws SQLException
         {
            return functional.execute(connection);
         }
      }.execute();
   }
480337
function(sql, attrs, callback) {
    var promise = this.definition.store.connection.raw(sql, attrs)

    if (typeof callback === 'function') {
      promise.then(callback)
    }

    return promise
  }
159830
def __fun_check(self, valid, fun, args=None, kwargs=None):
        '''
        
        '''
        if not isinstance(valid, list):
            valid = [valid]
        for cond in valid:
            # Function name match
            if isinstance(cond, six.string_types):
                if self.match_check(cond, fun):
                    return True
            # Function and args match
            elif isinstance(cond, dict):
                if len(cond) != 1:
                    # Invalid argument
                    continue
                fname_cond = next(six.iterkeys(cond))
                if self.match_check(fname_cond, fun):  # check key that is function name match
                    if self.__args_check(cond[fname_cond], args, kwargs):
                        return True
        return False
720010
def query_func_module(self, func):
        """"""
        exp = self.session.query(Export).filter_by(
            func=func).first()
        if exp:
            return exp
        logging.debug(_('Function not found: %s'), func)
        alt = func + 'A'
        exp = self.session.query(Export).filter_by(
            func=alt).first()
        if exp:
            logging.warning(_('Using ANSI version: %s'), alt)
            return exp
        logging.warning(_('Not handled: %s or %s'), func, alt)
        return None
169818
function isFunctionArray( value ) {
	var len, i;
	if ( !isArray( value ) ) {
		return false;
	}
	len = value.length;
	if ( !len ) {
		return false;
	}
	for ( i = 0; i < len; i++ ) {
		if ( !isFunction( value[i] ) ) {
			return false;
		}
	}
	return true;
}
836473
function checkForReservedTableName(args) {
  if (!args) {
    return;
  }
  if (args.databaseTypeName) {
    checkTableName(args.name, args.databaseTypeName, args.shouldThrow);
  } else {
    for (let i = 0, types = Object.keys(DatabaseTypes); i < types.length; i++) {
      if (typeof DatabaseTypes[types[i]] !== 'function') {
        checkTableName(args.name, DatabaseTypes[types[i]], args.shouldThrow);
      }
    }
  }
}
975137
private int handleSpecialFunctions()
    {

        boolean needsSpecialAttention = false;
        outer: for (UpdateClause c : kunderaQuery.getUpdateClauseQueue())
        {
            for (int i = 0; i < FUNCTION_KEYWORDS.length; i++)
            {
                if (c.getValue() instanceof String)
                {
                    String func = c.getValue().toString();
                    func = func.replaceAll(" ", "");
                    if (func.toUpperCase().matches(FUNCTION_KEYWORDS[i]))
                    {
                        needsSpecialAttention = true;
                        c.setValue(func);
                        break outer;
                    }
                }
            }
        }

        if (!needsSpecialAttention)
            return -1;

        EntityMetadata m = getEntityMetadata();
        Metamodel metaModel = kunderaMetadata.getApplicationMetadata().getMetamodel(m.getPersistenceUnit());
        Queue filterClauseQueue = kunderaQuery.getFilterClauseQueue();
        BasicDBObject query = createMongoQuery(m, filterClauseQueue);

        BasicDBObject update = new BasicDBObject();
        for (UpdateClause c : kunderaQuery.getUpdateClauseQueue())
        {
            String columName = getColumnName(m, metaModel.entity(m.getEntityClazz()), c.getProperty());
            boolean isSpecialFunction = false;
            for (int i = 0; i < FUNCTION_KEYWORDS.length; i++)
            {

                if (c.getValue() instanceof String
                        && c.getValue().toString().toUpperCase().matches(FUNCTION_KEYWORDS[i]))
                {
                    isSpecialFunction = true;

                    if (c.getValue().toString().toUpperCase().startsWith("INCREMENT("))
                    {
                        String val = c.getValue().toString().toUpperCase();
                        val = val.substring(10, val.indexOf(")"));
                        update.put("$inc", new BasicDBObject(columName, Integer.valueOf(val)));
                    }
                    else if (c.getValue().toString().toUpperCase().startsWith("DECREMENT("))
                    {
                        String val = c.getValue().toString().toUpperCase();
                        val = val.substring(10, val.indexOf(")"));
                        update.put("$inc", new BasicDBObject(columName, -Integer.valueOf(val)));
                    }
                }
            }
            if (!isSpecialFunction)
            {
                update.put(columName, c.getValue());
            }
        }

        Client client = persistenceDelegeator.getClient(m);
        return ((MongoDBClient) client).handleUpdateFunctions(query, update, m.getTableName());
    }
135951
def check_is_column(func):
    
    @wraps(func)
    def wrapper(**kwargs):
        table_name = kwargs['table_name']
        col_name = kwargs['col_name']
        if not orca.is_table(table_name):
            abort(404)
        if col_name not in orca.get_table(table_name).columns:
            abort(404)

        return func(**kwargs)
    return wrapper
1324119
def is_decorated(cls, f):
        ''''''
        real_func = inspect.unwrap(f)
        return real_func in cls.DECORATED_FUNCTIONS
667567
private function isFunction()
    {
        $lookaheadType = $this->lexer->lookahead['type'];
        $peek          = $this->lexer->peek();

        $this->lexer->resetPeek();

        return ($lookaheadType >= Lexer::T_IDENTIFIER && $peek['type'] === Lexer::T_OPEN_PARENTHESIS);
    }
621888
function(db) {
		function call_func(data, fun, params) {
			try {

				// Parse data
				if(!(data && (data instanceof Array))) {
					throw new TypeError("First argument is not an array");
				}

				// Parse fun
				if(fun.substr(0, 8) === 'function') {
					// FIXME: This is the same code as in nor-function -- should be reused from there.
					fun = new Function('return (' + fun + ')')();
				} else {
					throw new TypeError("Second argument is not valid serialized function");
				}

				// Parse params
				if(!(params && (params instanceof Array))) {
					throw new TypeError("Third argument is not an array");
				}

				return fun.apply(undefined, [].concat(data).concat(params) );

			} catch (e) {
				plv8.elog(ERROR, e);
				return;
			}
		}
		return db.query('CREATE SCHEMA IF NOT EXISTS nopg')
			.query('CREATE OR REPLACE FUNCTION nopg.call_func(data json, fun json, params json) RETURNS json LANGUAGE plv8 STABLE AS ' + NoPg._escapeFunction(call_func, ["data", "fun", "params"]) );
	}