Matthew Kilgore 05aa62f70c feat: STUBS!
2021-12-01 17:36:36 -05:00

1441 lines
36 KiB
Plaintext

<?php
namespace Illuminate\Database\Query;
class Expression {}
class Builder
{
/**
* Set the columns to be selected.
*
* @param array<mixed>|mixed $columns
* @return $this
*/
public function select($columns = ['*'])
{}
/**
* Add a subselect expression to the query.
*
* @param \Closure|$this|non-empty-string $query
* @param non-empty-string $as
* @return $this
*
* @throws \InvalidArgumentException
*/
public function selectSub($query, $as)
{}
/**
* Add a new "raw" select expression to the query.
*
* @param non-empty-string $expression
* @param array<mixed> $bindings
* @return $this
*/
public function selectRaw($expression, array $bindings = [])
{}
/**
* Makes "from" fetch from a subquery.
*
* @param \Closure|\Illuminate\Database\Query\Builder|non-empty-string $query
* @param non-empty-string $as
* @return $this
*
* @throws \InvalidArgumentException
*/
public function fromSub($query, $as)
{}
/**
* Add a raw from clause to the query.
*
* @param non-empty-string $expression
* @param mixed $bindings
* @return $this
*/
public function fromRaw($expression, $bindings = [])
{}
/**
* Creates a subquery and parse it.
*
* @param \Closure|\Illuminate\Database\Query\Builder|non-empty-string $query
* @return array<mixed>
*/
protected function createSub($query)
{}
/**
* Parse the subquery into SQL and bindings.
*
* @param mixed $query
* @return array<mixed>
*
* @throws \InvalidArgumentException
*/
protected function parseSub($query)
{}
/**
* Add a new select column to the query.
*
* @param array|mixed $column
* @return $this
*/
public function addSelect($column)
{}
/**
* Force the query to only return distinct results.
*
* @return $this
*/
public function distinct()
{}
/**
* Set the table which the query is targeting.
*
* @param \Closure|\Illuminate\Database\Query\Builder|non-empty-string $table
* @param non-empty-string|null $as
* @return $this
*/
public function from($table, $as = null)
{}
/**
* Add a join clause to the query.
*
* @param non-empty-string $table
* @param \Closure|non-empty-string $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @param non-empty-string $type
* @param bool $where
* @return $this
*/
public function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
{}
/**
* Add a "join where" clause to the query.
*
* @param non-empty-string $table
* @param \Closure|non-empty-string $first
* @param non-empty-string $operator
* @param non-empty-string $second
* @param non-empty-string $type
* @return $this
*/
public function joinWhere($table, $first, $operator, $second, $type = 'inner')
{}
/**
* Add a subquery join clause to the query.
*
* @param \Closure|\Illuminate\Database\Query\Builder|non-empty-string $query
* @param non-empty-string $as
* @param \Closure|non-empty-string $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @param non-empty-string $type
* @param bool $where
* @return $this
*
* @throws \InvalidArgumentException
*/
public function joinSub($query, $as, $first, $operator = null, $second = null, $type = 'inner', $where = false)
{}
/**
* Add a left join to the query.
*
* @param non-empty-string $table
* @param \Closure|non-empty-string $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @return $this
*/
public function leftJoin($table, $first, $operator = null, $second = null)
{}
/**
* Add a "join where" clause to the query.
*
* @param non-empty-string $table
* @param \Closure|non-empty-string $first
* @param non-empty-string $operator
* @param non-empty-string $second
* @return $this
*/
public function leftJoinWhere($table, $first, $operator, $second)
{}
/**
* Add a subquery left join to the query.
*
* @param \Closure|\Illuminate\Database\Query\Builder|non-empty-string $query
* @param non-empty-string $as
* @param \Closure|non-empty-string $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @return $this
*/
public function leftJoinSub($query, $as, $first, $operator = null, $second = null)
{}
/**
* Add a right join to the query.
*
* @param non-empty-string $table
* @param \Closure|non-empty-string $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @return $this
*/
public function rightJoin($table, $first, $operator = null, $second = null)
{}
/**
* Add a "right join where" clause to the query.
*
* @param non-empty-string $table
* @param \Closure|non-empty-string $first
* @param non-empty-string $operator
* @param non-empty-string $second
* @return $this
*/
public function rightJoinWhere($table, $first, $operator, $second)
{}
/**
* Add a subquery right join to the query.
*
* @param \Closure|\Illuminate\Database\Query\Builder|non-empty-string $query
* @param non-empty-string $as
* @param \Closure|non-empty-string $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @return $this
*/
public function rightJoinSub($query, $as, $first, $operator = null, $second = null)
{}
/**
* Add a "cross join" clause to the query.
*
* @param non-empty-string $table
* @param \Closure|string|null $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @return $this
*/
public function crossJoin($table, $first = null, $operator = null, $second = null)
{}
/**
* Add a basic where clause to the query.
*
* @param \Closure|string|array<string|int, mixed> $column
* @param mixed $operator
* @param mixed $value
* @param non-empty-string $boolean
* @return $this
*/
public function where($column, $operator = null, $value = null, $boolean = 'and')
{}
/**
* Add an array of where clauses to the query.
*
* @param array<string|int, mixed> $column
* @param non-empty-string $boolean
* @param non-empty-string $method
* @return $this
*/
protected function addArrayOfWheres($column, $boolean, $method = 'where')
{}
/**
* Prepare the value and operator for a where clause.
*
* @param non-empty-string $value
* @param non-empty-string $operator
* @param bool $useDefault
* @return array<mixed>
*
* @throws \InvalidArgumentException
*/
public function prepareValueAndOperator($value, $operator, $useDefault = false)
{}
/**
* Determine if the given operator and value combination is legal.
*
* Prevents using Null values with invalid operators.
*
* @param non-empty-string $operator
* @param mixed $value
* @return bool
*/
protected function invalidOperatorAndValue($operator, $value)
{}
/**
* Determine if the given operator is supported.
*
* @param non-empty-string $operator
* @return bool
*/
protected function invalidOperator($operator)
{}
/**
* Add an "or where" clause to the query.
*
* @param \Closure|array<int, mixed> $column
* @param mixed $operator
* @param mixed $value
* @return $this
*/
public function orWhere($column, $operator = null, $value = null)
{}
/**
* Add a "where" clause comparing two columns to the query.
*
* @param array<int, mixed> $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @param non-empty-string|null $boolean
* @return $this
*/
public function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
{}
/**
* Add an "or where" clause comparing two columns to the query.
*
* @param non-empty-string|array<mixed> $first
* @param non-empty-string|null $operator
* @param non-empty-string|null $second
* @return $this
*/
public function orWhereColumn($first, $operator = null, $second = null)
{}
/**
* Add a raw where clause to the query.
*
* @param non-empty-string $sql
* @param mixed $bindings
* @param non-empty-string $boolean
* @return $this
*/
public function whereRaw($sql, $bindings = [], $boolean = 'and')
{}
/**
* Add a raw or where clause to the query.
*
* @param non-empty-string $sql
* @param mixed $bindings
* @return $this
*/
public function orWhereRaw($sql, $bindings = [])
{}
/**
* Add a "where in" clause to the query.
*
* @param non-empty-string $column
* @param mixed $values
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function whereIn($column, $values, $boolean = 'and', $not = false)
{}
/**
* Add an "or where in" clause to the query.
*
* @param non-empty-string $column
* @param mixed $values
* @return $this
*/
public function orWhereIn($column, $values)
{}
/**
* Add a "where not in" clause to the query.
*
* @param non-empty-string $column
* @param mixed $values
* @param non-empty-string $boolean
* @return $this
*/
public function whereNotIn($column, $values, $boolean = 'and')
{}
/**
* Add an "or where not in" clause to the query.
*
* @param non-empty-string $column
* @param mixed $values
* @return $this
*/
public function orWhereNotIn($column, $values)
{}
/**
* Add a "where in raw" clause for integer values to the query.
*
* @param non-empty-string $column
* @param \Illuminate\Contracts\Support\Arrayable|array<int|string, mixed> $values
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)
{}
/**
* Add an "or where in raw" clause for integer values to the query.
*
* @param non-empty-string $column
* @param \Illuminate\Contracts\Support\Arrayable|array<int|string, mixed> $values
* @return $this
*/
public function orWhereIntegerInRaw($column, $values)
{}
/**
* Add a "where not in raw" clause for integer values to the query.
*
* @param non-empty-string $column
* @param \Illuminate\Contracts\Support\Arrayable|array<string, mixed> $values
* @param non-empty-string $boolean
* @return $this
*/
public function whereIntegerNotInRaw($column, $values, $boolean = 'and')
{}
/**
* Add an "or where not in raw" clause for integer values to the query.
*
* @param non-empty-string $column
* @param \Illuminate\Contracts\Support\Arrayable|array<string, mixed> $values
* @return $this
*/
public function orWhereIntegerNotInRaw($column, $values)
{}
/**
* Add a "where null" clause to the query.
*
* @param non-empty-string|array<string> $columns
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function whereNull($columns, $boolean = 'and', $not = false)
{}
/**
* Add an "or where null" clause to the query.
*
* @param non-empty-string $column
* @return $this
*/
public function orWhereNull($column)
{}
/**
* Add a "where not null" clause to the query.
*
* @param non-empty-string|array<string> $columns
* @param non-empty-string $boolean
* @return $this
*/
public function whereNotNull($columns, $boolean = 'and')
{}
/**
* Add a where between statement to the query.
*
* @param non-empty-string $column
* @param array<string|int, mixed> $values
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function whereBetween($column, array $values, $boolean = 'and', $not = false)
{}
/**
* Add an or where between statement to the query.
*
* @param non-empty-string $column
* @param array<string|int, mixed> $values
* @return $this
*/
public function orWhereBetween($column, array $values)
{}
/**
* Add a where not between statement to the query.
*
* @param non-empty-string $column
* @param array<string|int, mixed> $values
* @param non-empty-string $boolean
* @return $this
*/
public function whereNotBetween($column, array $values, $boolean = 'and')
{}
/**
* Add an or where not between statement to the query.
*
* @param non-empty-string $column
* @param array<string|int, mixed> $values
* @return $this
*/
public function orWhereNotBetween($column, array $values)
{}
/**
* Add an "or where not null" clause to the query.
*
* @param non-empty-string $column
* @return $this
*/
public function orWhereNotNull($column)
{}
/**
* Add a "where date" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @param non-empty-string $boolean
* @return $this
*/
public function whereDate($column, $operator, $value = null, $boolean = 'and')
{}
/**
* Add an "or where date" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @return $this
*/
public function orWhereDate($column, $operator, $value = null)
{}
/**
* Add a "where time" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @param non-empty-string $boolean
* @return $this
*/
public function whereTime($column, $operator, $value = null, $boolean = 'and')
{}
/**
* Add an "or where time" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @return $this
*/
public function orWhereTime($column, $operator, $value = null)
{}
/**
* Add a "where day" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @param non-empty-string $boolean
* @return $this
*/
public function whereDay($column, $operator, $value = null, $boolean = 'and')
{}
/**
* Add an "or where day" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @return $this
*/
public function orWhereDay($column, $operator, $value = null)
{}
/**
* Add a "where month" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @param non-empty-string $boolean
* @return $this
*/
public function whereMonth($column, $operator, $value = null, $boolean = 'and')
{}
/**
* Add an "or where month" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|null $value
* @return $this
*/
public function orWhereMonth($column, $operator, $value = null)
{}
/**
* Add a "where year" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|int|null $value
* @param non-empty-string $boolean
* @return $this
*/
public function whereYear($column, $operator, $value = null, $boolean = 'and')
{}
/**
* Add an "or where year" statement to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \DateTimeInterface|string|int|null $value
* @return $this
*/
public function orWhereYear($column, $operator, $value = null)
{}
/**
* Add a date based (year, month, day, time) statement to the query.
*
* @param non-empty-string $type
* @param non-empty-string $column
* @param non-empty-string $operator
* @param mixed $value
* @param non-empty-string $boolean
* @return $this
*/
protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and')
{}
/**
* Add a nested where statement to the query.
*
* @param \Closure $callback
* @param non-empty-string $boolean
* @return $this
*/
public function whereNested(\Closure $callback, $boolean = 'and')
{}
/**
* Create a new query instance for nested where condition.
*
* @return $this
*/
public function forNestedWhere()
{}
/**
* Add another query builder as a nested where to the query builder.
*
* @param $this $query
* @param non-empty-string $boolean
* @return $this
*/
public function addNestedWhereQuery($query, $boolean = 'and')
{}
/**
* Add a full sub-select to the query.
*
* @param non-empty-string $column
* @param non-empty-string $operator
* @param \Closure $callback
* @param non-empty-string $boolean
* @return $this
*/
protected function whereSub($column, $operator, \Closure $callback, $boolean)
{}
/**
* Add an exists clause to the query.
*
* @param \Closure $callback
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function whereExists(\Closure $callback, $boolean = 'and', $not = false)
{}
/**
* Add an or exists clause to the query.
*
* @param \Closure $callback
* @param bool $not
* @return $this
*/
public function orWhereExists(\Closure $callback, $not = false)
{}
/**
* Add a where not exists clause to the query.
*
* @param \Closure $callback
* @param non-empty-string $boolean
* @return $this
*/
public function whereNotExists(\Closure $callback, $boolean = 'and')
{}
/**
* Add a where not exists clause to the query.
*
* @param \Closure $callback
* @return $this
*/
public function orWhereNotExists(\Closure $callback)
{}
/**
* Add an exists clause to the query.
*
* @param \Illuminate\Database\Query\Builder $query
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function addWhereExistsQuery(self $query, $boolean = 'and', $not = false)
{}
/**
* Adds a where condition using row values.
*
* @param array<string> $columns
* @param non-empty-string $operator
* @param array<string|int, mixed> $values
* @param non-empty-string $boolean
* @return $this
*
* @throws \InvalidArgumentException
*/
public function whereRowValues($columns, $operator, $values, $boolean = 'and')
{}
/**
* Adds a or where condition using row values.
*
* @param array<string> $columns
* @param non-empty-string $operator
* @param array<string|int, mixed> $values
* @return $this
*/
public function orWhereRowValues($columns, $operator, $values)
{}
/**
* Add a "where JSON contains" clause to the query.
*
* @param non-empty-string $column
* @param mixed $value
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function whereJsonContains($column, $value, $boolean = 'and', $not = false)
{}
/**
* Add a "or where JSON contains" clause to the query.
*
* @param non-empty-string $column
* @param mixed $value
* @return $this
*/
public function orWhereJsonContains($column, $value)
{}
/**
* Add a "where JSON not contains" clause to the query.
*
* @param non-empty-string $column
* @param mixed $value
* @param non-empty-string $boolean
* @return $this
*/
public function whereJsonDoesntContain($column, $value, $boolean = 'and')
{}
/**
* Add a "or where JSON not contains" clause to the query.
*
* @param non-empty-string $column
* @param mixed $value
* @return $this
*/
public function orWhereJsonDoesntContain($column, $value)
{}
/**
* Add a "where JSON length" clause to the query.
*
* @param non-empty-string $column
* @param mixed $operator
* @param mixed $value
* @param non-empty-string $boolean
* @return $this
*/
public function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
{}
/**
* Add a "or where JSON length" clause to the query.
*
* @param non-empty-string $column
* @param mixed $operator
* @param mixed $value
* @return $this
*/
public function orWhereJsonLength($column, $operator, $value = null)
{}
/**
* Handles dynamic "where" clauses to the query.
*
* @param non-empty-string $method
* @param array<mixed> $parameters
* @return $this
*/
public function dynamicWhere($method, $parameters)
{}
/**
* Add a single dynamic where clause statement to the query.
*
* @param non-empty-string $segment
* @param non-empty-string $connector
* @param array<mixed> $parameters
* @param int $index
* @return void
*/
protected function addDynamic($segment, $connector, $parameters, $index)
{}
/**
* Add a "group by" clause to the query.
*
* @param array<mixed>|non-empty-string ...$groups
* @return $this
*/
public function groupBy(...$groups)
{}
/**
* Add a raw groupBy clause to the query.
*
* @param non-empty-string $sql
* @param array<mixed> $bindings
* @return $this
*/
public function groupByRaw($sql, array $bindings = [])
{}
/**
* Add a "having" clause to the query.
*
* @param non-empty-string $column
* @param non-empty-string|null $operator
* @param non-empty-string|null $value
* @param non-empty-string $boolean
* @return $this
*/
public function having($column, $operator = null, $value = null, $boolean = 'and')
{}
/**
* Add a "or having" clause to the query.
*
* @param non-empty-string $column
* @param non-empty-string|null $operator
* @param non-empty-string|null $value
* @return $this
*/
public function orHaving($column, $operator = null, $value = null)
{}
/**
* Add a "having between " clause to the query.
*
* @param non-empty-string $column
* @param array<string, mixed> $values
* @param non-empty-string $boolean
* @param bool $not
* @return $this
*/
public function havingBetween($column, array $values, $boolean = 'and', $not = false)
{}
/**
* Add a raw having clause to the query.
*
* @param non-empty-string $sql
* @param array<mixed> $bindings
* @param non-empty-string $boolean
* @return $this
*/
public function havingRaw($sql, array $bindings = [], $boolean = 'and')
{}
/**
* Add a raw or having clause to the query.
*
* @param non-empty-string $sql
* @param array<mixed> $bindings
* @return $this
*/
public function orHavingRaw($sql, array $bindings = [])
{}
/**
* Add an "order by" clause to the query.
*
* @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|non-empty-string $column
* @param non-empty-string $direction
* @return $this
*
* @throws \InvalidArgumentException
*/
public function orderBy($column, $direction = 'asc')
{}
/**
* Add a descending "order by" clause to the query.
*
* @param non-empty-string $column
* @return $this
*/
public function orderByDesc($column)
{}
/**
* Add an "order by" clause for a timestamp to the query.
*
* @param non-empty-string|\Illuminate\Database\Query\Expression $column
* @return $this
*/
public function latest($column = 'created_at')
{}
/**
* Add an "order by" clause for a timestamp to the query.
*
* @param non-empty-string|\Illuminate\Database\Query\Expression $column
* @return $this
*/
public function oldest($column = 'created_at')
{}
/**
* Put the query's results in random order.
*
* @param non-empty-string $seed
* @return $this
*/
public function inRandomOrder($seed = '')
{}
/**
* Add a raw "order by" clause to the query.
*
* @param non-empty-string $sql
* @param array<mixed> $bindings
* @return $this
*/
public function orderByRaw($sql, $bindings = [])
{}
/**
* Alias to set the "offset" value of the query.
*
* @param int $value
* @return $this
*/
public function skip($value)
{}
/**
* Set the "offset" value of the query.
*
* @param int $value
* @return $this
*/
public function offset($value)
{}
/**
* Alias to set the "limit" value of the query.
*
* @param int $value
* @return $this
*/
public function take($value)
{}
/**
* Set the "limit" value of the query.
*
* @param int $value
* @return $this
*/
public function limit($value)
{}
/**
* Set the limit and offset for a given page.
*
* @param int $page
* @param int $perPage
* @return $this
*/
public function forPage($page, $perPage = 15)
{}
/**
* Constrain the query to the previous "page" of results before a given ID.
*
* @param int $perPage
* @param int|null $lastId
* @param non-empty-string $column
* @return $this
*/
public function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id')
{}
/**
* Constrain the query to the next "page" of results after a given ID.
*
* @param int $perPage
* @param int|null $lastId
* @param non-empty-string $column
* @return $this
*/
public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
{}
/**
* Remove all existing orders and optionally add a new order.
*
* @param non-empty-string|null $column
* @param non-empty-string $direction
* @return $this
*/
public function reorder($column = null, $direction = 'asc')
{}
/**
* Get an array with all orders with a given column removed.
*
* @param non-empty-string $column
* @return array<mixed>
*/
protected function removeExistingOrdersFor($column)
{}
/**
* Add a union statement to the query.
*
* @param \Illuminate\Database\Query\Builder|\Closure $query
* @param bool $all
* @return $this
*/
public function union($query, $all = false)
{}
/**
* Add a union all statement to the query.
*
* @param \Illuminate\Database\Query\Builder|\Closure $query
* @return $this
*/
public function unionAll($query)
{}
/**
* Lock the selected rows in the table.
*
* @param non-empty-string|bool $value
* @return $this
*/
public function lock($value = true)
{}
/**
* Lock the selected rows in the table for updating.
*
* @return static
*/
public function lockForUpdate()
{}
/**
* Share lock the selected rows in the table.
*
* @return $this
*/
public function sharedLock()
{}
/**
* Execute a query for a single record by ID.
*
* @param int|non-empty-string $id
* @param array<string> $columns
* @return mixed|static
*/
public function find($id, $columns = ['*'])
{}
/**
* Throw an exception if the query doesn't have an orderBy clause.
*
* @return void
*
* @throws \RuntimeException
*/
protected function enforceOrderBy()
{}
/**
* Get an array with the values of a given column.
*
* @param non-empty-string|\Illuminate\Database\Query\Expression $column
* @param non-empty-string|null $key
* @return \Illuminate\Support\Collection<string, mixed>
*/
public function pluck($column, $key = null)
{}
/**
* Concatenate values of a given column as a string.
*
* @param non-empty-string $column
* @param non-empty-string $glue
* @return string
*/
public function implode($column, $glue = '')
{}
/**
* Determine if any rows exist for the current query.
*
* @return bool
*/
public function exists()
{}
/**
* Determine if no rows exist for the current query.
*
* @return bool
*/
public function doesntExist()
{}
/**
* Execute the given callback if no rows exist for the current query.
*
* @param \Closure $callback
* @return mixed
*/
public function existsOr(\Closure $callback)
{}
/**
* Execute the given callback if rows exist for the current query.
*
* @param \Closure $callback
* @return mixed
*/
public function doesntExistOr(\Closure $callback)
{}
/**
* Retrieve the "count" result of the query.
*
* @param non-empty-string $columns
* @return int
*/
public function count($columns = '*')
{}
/**
* Retrieve the minimum value of a given column.
*
* @param non-empty-string $column
* @return mixed
*/
public function min($column)
{}
/**
* Retrieve the maximum value of a given column.
*
* @param non-empty-string $column
* @return mixed
*/
public function max($column)
{}
/**
* Retrieve the sum of the values of a given column.
*
* @param non-empty-string $column
* @return mixed
*/
public function sum($column)
{}
/**
* Retrieve the average of the values of a given column.
*
* @param non-empty-string $column
* @return mixed
*/
public function avg($column)
{}
/**
* Alias for the "avg" method.
*
* @param non-empty-string $column
* @return mixed
*/
public function average($column)
{}
/**
* Execute an aggregate function on the database.
*
* @param non-empty-string $function
* @param array<string> $columns
* @return mixed
*/
public function aggregate($function, $columns = ['*'])
{}
/**
* Execute a numeric aggregate function on the database.
*
* @param non-empty-string $function
* @param array<string> $columns
* @return float|int
*/
public function numericAggregate($function, $columns = ['*'])
{}
/**
* Set the aggregate property without running the query.
*
* @param non-empty-string $function
* @param array<string> $columns
* @return $this
*/
protected function setAggregate($function, $columns)
{}
/**
* Execute the given callback while selecting the given columns.
*
* After running the callback, the columns are reset to the original value.
*
* @param array<string> $columns
* @param callable $callback
* @return mixed
*/
protected function onceWithColumns($columns, $callback)
{}
/**
* Insert a new record into the database.
*
* @param array<mixed> $values
* @return bool
*/
public function insert(array $values)
{}
/**
* Insert a new record into the database while ignoring errors.
*
* @param array<mixed> $values
* @return int
*/
public function insertOrIgnore(array $values)
{}
/**
* Insert a new record and get the value of the primary key.
*
* @param array<string, mixed> $values
* @param non-empty-string|null $sequence
* @return int
*/
public function insertGetId(array $values, $sequence = null)
{}
/**
* Insert new records into the table using a subquery.
*
* @param array<string> $columns
* @param \Closure|\Illuminate\Database\Query\Builder|non-empty-string $query
* @return int
*/
public function insertUsing(array $columns, $query)
{}
/**
* Update a record in the database.
*
* @param array<string, mixed> $values
* @return int
*/
public function update(array $values)
{}
/**
* Insert or update a record matching the attributes, and fill it with values.
*
* @param array<string, mixed> $attributes
* @param array<string, mixed> $values
* @return bool
*/
public function updateOrInsert(array $attributes, array $values = [])
{}
/**
* Increment a column's value by a given amount.
*
* @param non-empty-string|\Illuminate\Database\Query\Expression $column
* @param float|int $amount
* @param array<string, mixed> $extra
* @return int
*
* @throws \InvalidArgumentException
*/
public function increment($column, $amount = 1, array $extra = [])
{}
/**
* Decrement a column's value by a given amount.
*
* @param non-empty-string|\Illuminate\Database\Query\Expression $column
* @param float|int $amount
* @param array<string, mixed> $extra
* @return int
*
* @throws \InvalidArgumentException
*/
public function decrement($column, $amount = 1, array $extra = [])
{}
/**
* Delete a record from the database.
*
* @param mixed $id
* @return int
*/
public function delete($id = null)
{}
/**
* Run a truncate statement on the table.
*
* @return void
*/
public function truncate()
{}
/**
* Get a new instance of the query builder.
*
* @return $this
*/
public function newQuery()
{}
/**
* Get the current query value bindings in a flattened array.
*
* @return array<mixed>
*/
public function getBindings()
{}
/**
* Get the raw array of bindings.
*
* @return array<mixed>
*/
public function getRawBindings()
{}
/**
* Set the bindings on the query builder.
*
* @param array<mixed> $bindings
* @param non-empty-string $type
* @return $this
*
* @throws \InvalidArgumentException
*/
public function setBindings(array $bindings, $type = 'where')
{}
/**
* Add a binding to the query.
*
* @param mixed $value
* @param non-empty-string $type
* @return $this
*
* @throws \InvalidArgumentException
*/
public function addBinding($value, $type = 'where')
{}
/**
* Merge an array of bindings into our bindings.
*
* @param \Illuminate\Database\Query\Builder $query
* @return $this
*/
public function mergeBindings(self $query)
{}
}