Creates a table in browser console in supported browsers. Handler
in JavaScript will revert to log() if not supported

@param mixed function arguments   [Any quantity or kind]
@return self
768105
final public function table()
	{
		$args = func_get_args();
		$this->response['table'] = (count($args) == 1) ? $args[0] : $args;
		return $this;
	}
1100593
public static function table($name)
    {
        Validate::table($name)->exists();

        $self                  = new self();
        $self->tables['local'] = $name;

        return $self;
    }
75001
function createDbTable(t, dbInfo, callback, errorCallback) {
    t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);
}
1280478
private function createFunction($func, array $arguments = array(), $alias = null)
    {
        // Prepare function arguments
        foreach ($arguments as $index => $argument) {
            if ($argument instanceof RawSqlFragmentInterface) {
                $item = $argument->getFragment();
            } else {
                $item = $this->quote($argument);
            }

            // Update item collection
            $arguments[$index] = $item;
        }

        $fragment = sprintf(' %s(%s) ', $func, implode(', ', $arguments));

        // Generate alias if provided
        if (!is_null($alias)) {
            $fragment .= sprintf(' AS %s ', $this->quote($alias));
        }

        // Append a comma if there was a function call before
        if ($this->hasFunctionCall === true) {
            $this->append(', ');
        }

        $this->hasFunctionCall = true;
        return $fragment;
    }
1139845
public static function create($function) : \ReflectionFunctionAbstract
    {
        if (\is_string($function)) {
            return \strpos($function, '::') ? new \ReflectionMethod($function) : new \ReflectionFunction($function);
        }

        if (\is_array($function)) {
            return (new \ReflectionClass(\ReflectionMethod::class))->newInstanceArgs($function);
        }

        if (\method_exists($function, '__invoke')) {
            return new \ReflectionMethod($function, '__invoke');
        }

        return new \ReflectionFunction($function);
    }
1372384
function _func()
	{
		$num_args = 0; // number of arguments received
		$function = strtoupper($this->_current_token);
		$result   = ''; // initialize result
		$this->_advance();
		$this->_advance();         // eat the "("
		while ($this->_current_token != ')') {
		/**/
			if ($num_args > 0) {
				if ($this->_current_token == "," or
					$this->_current_token == ";")
				{
					$this->_advance();  // eat the "," or ";"
				} else {
					throw new PHPExcel_Writer_Exception("Syntax error: comma expected in ".
									  "function $function, arg #{$num_args}");
				}
				$result2 = $this->_condition();
				$result = $this->_createTree('arg', $result, $result2);
			} else { // first argument
				$result2 = $this->_condition();
				$result = $this->_createTree('arg', '', $result2);
			}
			++$num_args;
		}
		if (!isset($this->_functions[$function])) {
			throw new PHPExcel_Writer_Exception("Function $function() doesn't exist");
		}
		$args = $this->_functions[$function][1];
		// If fixed number of args eg. TIME($i,$j,$k). Check that the number of args is valid.
		if (($args >= 0) and ($args != $num_args)) {
			throw new PHPExcel_Writer_Exception("Incorrect number of arguments in function $function() ");
		}

		$result = $this->_createTree($function, $result, $num_args);
		$this->_advance();         // eat the ")"
		return $result;
	}
831580
public function aggregate($function, $columns = ['*'])
    {
        $result = $this->getBuilder()->aggregate($function, $columns);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
1049582
function createFunction() {
      // Lazy define.
      createFunction = function(args, body) {
        var result,
            anchor = freeDefine ? freeDefine.amd : Benchmark,
            prop = uid + 'createFunction';

        runScript((freeDefine ? 'define.amd.' : 'Benchmark.') + prop + '=function(' + args + '){' + body + '}');
        result = anchor[prop];
        delete anchor[prop];
        return result;
      };
      // Fix JaegerMonkey bug.
      // For more information see http://bugzil.la/639720.
      createFunction = support.browser && (createFunction('', 'return"' + uid + '"') || _.noop)() == uid ? createFunction : Function;
      return createFunction.apply(null, arguments);
    }
1293616
static function create($left = null, $right = null, $operator=Query::EQUAL, $quote = null) {
		return new self($left, $right, $operator, $quote);
	}
1343315
static function table($newtable = false)
    {
        static $_table;

        if (!empty($newtable))  $_table = $newtable;
		if (empty($_table)) $_table = 'adodb_logsql';
        return $_table;
    }
287016
function (fn) {
    if (!fn || !_.isFunction(fn)) {
      var err = new Error('Please pass a valid function!');
      debug(err);
      throw err;
    }

    if (fn.length === 1) {
      this.getNewId = fn;
      return this;
    }

    this.getNewId = function (callback) {
      callback(null, fn());
    };

    return this;
  }
1118850
public static function allowExcessiveArguments(callable $function)
    {
        $reflection = Reflection::fromCallable($function);
        if ($reflection->isUserDefined()) {
            return $function;
        }

        if (Reflection::isVariadic($reflection)) {
            return $function;
        }

        $numberOfArguments = $reflection->getNumberOfParameters();

        $argumentLimiter = function () use ($function, $numberOfArguments) {
            return call_user_func_array($function, array_slice(func_get_args(), 0, $numberOfArguments));
        };

        /*
         * If there are default values, just use the default closure to
         * ensure correct default values are used for unsupplied arguments.
         */
        if ($numberOfArguments !== $reflection->getNumberOfRequiredParameters()) {
            return $argumentLimiter;
        }

        /*
         * Micro-optimization: provide simple wrappers for internal functions
         * with simple signatures rather than the more costly argument array slicing.
         */
        switch ($numberOfArguments) {
            case 0:
                return function () use ($function) {
                    return $function();
                };

            case 1:
                return function ($a) use ($function) {
                    return $function($a);
                };

            case 2:
                return function ($a, $b) use ($function) {
                    return $function($a, $b);
                };

            case 3:
                return function ($a, $b, $c) use ($function) {
                    return $function($a, $b, $c);
                };

            case 4:
                return function ($a, $b, $c, $d) use ($function) {
                    return $function($a, $b, $c, $d);
                };

            default:
                return $argumentLimiter;
        }
    }
914533
public function aggregate($function, $columns = array('*'))
	{
		$this->aggregate = compact('function', 'columns');

		$previousColumns = $this->columns;

		$results = $this->get($columns);

		// Once we have executed the query, we will reset the aggregate property so
		// that more select queries can be executed against the database without
		// the aggregate value getting in the way when the grammar builds it.
		$this->aggregate = null;

		$this->columns = $previousColumns;

		if (isset($results[0]))
		{
			$result = array_change_key_case((array) $results[0]);

			return $result['aggregate'];
		}
	}
385756
public function table($table)
    {
        $this->table = $table;
        $alias = $this->alias ?? $this->table;

        if (!in_array('`' . $table . '`.*', $this->select) && !in_array('`' . $alias . '`.*', $this->select)) {
            $this->select[] = '`' . $table . '`.*';
        }

        return $this;
    }
876092
public static function createCustomFunction(
        string $function,
        float $weight = self::DEFAULT_WEIGHT,
        Filter $filter = null,
        string $scoreMode = self::SCORE_MODE_AVG
    ): ScoreStrategy {
        $scoreStrategy = self::createDefault();
        $scoreStrategy->type = self::CUSTOM_FUNCTION;
        $scoreStrategy->configuration['function'] = $function;
        $scoreStrategy->weight = $weight;
        $scoreStrategy->filter = self::fixFilterFieldPath($filter);
        $scoreStrategy->scoreMode = $scoreMode;

        return $scoreStrategy;
    }
526740
function createTables() {
            return Promise.all(Object.keys(CRUD.EntityManager.entities).map(function(entityName) {
                var entity = CRUD.EntityManager.entities[entityName];
                if (tables.indexOf(entity.table) == -1) {
                    if (!entity.createStatement) {
                        throw "No create statement found for " + entity.getType() + ". Don't know how to create table.";
                    }
                    return db.execute(entity.createStatement).then(function() {
                        tables.push(entity.table);
                        localStorage.setItem('database.version.' + entity.table, ('migrations' in entity) ? Math.max.apply(Math, Object.keys(entity.migrations)) : 1);
                        CRUD.log(entity.table + " table created.");
                        return entity;
                    }, function(err) {
                        CRUD.log("Error creating " + entity.table, err, entity.createStatement);
                        throw "Error creating table: " + entity.table;
                    }).then(createFixtures).then(function() {
                        CRUD.log("Table created and fixtures inserted for ", entityName);
                        return;
                    });
                }
                return;
            }));
        }
510591
public function each(callable $function): self {
        foreach ($this->nodes as $index => $node) {
            $result = $function($node, $index);

            if ($result === false) {
                break;
            }
        }

        return $this;
    }