Builder
classe Builder étends QueryBuilder (Voir la source)
Propriétés
| protected string | $table | The table name  | 
                depuis QueryBuilder | 
| protected string | $select | Select statement collector  | 
                depuis QueryBuilder | 
| protected string | $where | Where statement collector  | 
                depuis QueryBuilder | 
| protected array | $where_data_binding | The data binding information  | 
                depuis QueryBuilder | 
| protected string | $join | Join statement collector  | 
                depuis QueryBuilder | 
| protected string | $limit | Limit statement collector  | 
                depuis QueryBuilder | 
| protected string | $group | Group statement collector  | 
                depuis QueryBuilder | 
| protected string | $having | Having statement collector  | 
                depuis QueryBuilder | 
| protected string | $order | Order By statement collector  | 
                depuis QueryBuilder | 
| protected string | $as | Define the table as  | 
                depuis QueryBuilder | 
| protected PDO | $connection | The PDO instance  | 
                depuis QueryBuilder | 
| protected bool | $first | Define whether to retrieve information from the list  | 
                depuis QueryBuilder | 
| protected string | $prefix | The table prefix  | 
                depuis QueryBuilder | 
| protected string | $model | The model instance  | 
                
Méthodes
Add where clause into the request
orWhere, add a condition of type:
Where clause with comparison in << is null >>
Where clause with comparison in <
Where clause with comparison <
WHERE column NOT BETWEEN '' AND ''
Where clause with <
Where clause with <
Join clause
Left Join clause
Right Join clause
On, if chained with itself must add an << and >> before, otherwise if chained with "orOn" who add a "before"
Clause On, followed by a combination by a comparator <
clause having, is used with a groupBy
Remove simplified stream from delete.
Action increment, add 1 by default to the specified field
Decrement action, subtracts 1 by default from the specified field
InsertAndGetLastId action launches the insert and lastInsertId actions
Paginate, make pagination system
Check if rows exists
Turn back the id of the last insertion
Set model
Get model
Détails
        
                            
    __construct(string $table, PDO $connection)
        
    
    QueryBuilder Constructor
        
                            QueryBuilder
    select(array $select = ['*'])
        
    
    Add select column.
SELECT $column | SELECT column1, column2, ...
        
                            QueryBuilder
    as(string $as)
        
    
    Create the table as
        
                            QueryBuilder
    where(string $column, string $comp = '=', mixed $value = null, string $boolean = 'and')
        
    
    Add where clause into the request
WHERE column1 $comp $value|column
        
                            QueryBuilder
    whereRaw(string $where)
        
    
    Add where clause into the request
WHERE column1 $comp $value|column
        
                            QueryBuilder
    orWhere(string $column, string $comp = '=', mixed $value = null)
        
    
    orWhere, add a condition of type:
[where column = value or column = value]
        
                            QueryBuilder
    whereNull(string $column, string $boolean = 'and')
        
    
    Where clause with comparison in << is null >>
WHERE column IS NULL
        
                            QueryBuilder
    whereNotNull($column, string $boolean = 'and')
        
    
    Where clause with comparison in <
WHERE column NOT NULL
        
                            QueryBuilder
    whereBetween(string $column, array $range, string $boolean = 'and')
        
    
    Where clause with comparison <
WHERE column BETWEEN '' AND ''
        
                            QueryBuilder
    whereNotBetween(string $column, array $range)
        
    
    WHERE column NOT BETWEEN '' AND ''
        
                            QueryBuilder
    whereIn(string $column, array $range, string $boolean = 'and')
        
    
    Where clause with <
        
                            QueryBuilder
    whereNotIn(string $column, array $range)
        
    
    Where clause with <
        
                            QueryBuilder
    join(string $table, string $first, string $comp = '=', string $second = null)
        
    
    Join clause
        
                            QueryBuilder
    leftJoin(string $table, string $first, string $comp = '=', string $second = null)
        
    
    Left Join clause
        
                            QueryBuilder
    rightJoin(string $table, string $first, string $comp = '=', string $second = null)
        
    
    Right Join clause
        
                            QueryBuilder
    andOn(string $first, string $comp = '=', string $second = null)
        
    
    On, if chained with itself must add an << and >> before, otherwise if chained with "orOn" who add a "before"
        
                            QueryBuilder
    orOn(string $first, string $comp = '=', string $second = null)
        
    
    Clause On, followed by a combination by a comparator <
        
                            QueryBuilder
    groupBy(string $column)
        
    
    Clause Group By
        
                            QueryBuilder
    group(string $column)
        déprécié
    
    déprécié
Clause Group By
        
                            QueryBuilder
    having(string $column, string $comp = '=', mixed $value = null, string $boolean = 'and')
        
    
    clause having, is used with a groupBy
        
                            QueryBuilder
    orderBy(string $column, string $type = 'asc')
        
    
    Clause Order By
        
                            QueryBuilder
    jump(int $offset = 0)
        
    
    Jump = Offset
        
                            QueryBuilder
    take(int $limit)
        
    
    Take = Limit
        
                            QueryBuilder|number|array|object
    max(string $column)
        
    
    Max
        
                            QueryBuilder|number|object
    min(string $column)
        
    
    Min
        
                            QueryBuilder|number|object
    avg(string $column)
        
    
    Avg
        
                            QueryBuilder|number|object
    sum(string $column)
        
    
    Sum
        
                            int
    count(string $column = '*')
        
    
    Count
        
                            array|stdClass
    get(array $columns = [])
        
    
    Get informations
        
                            object|null
    first()
        
    
    Get the first record
        
                            mixed
    last()
        
    
    Get the last record
        
                            int
    update(array $data = [])
        
    
    Update action
        
                            int
    delete()
        
    
    Delete Action
        
                            int
    remove(string $column, string $comp = '=', string $value = null)
        
    
    Remove simplified stream from delete.
        
                            int
    increment(string $column, int $step = 1)
        
    
    Action increment, add 1 by default to the specified field
        
                            int
    decrement(string $column, int $step = 1)
        
    
    Decrement action, subtracts 1 by default from the specified field
        
                            QueryBuilder
    distinct(string $column)
        
    
    Allows a query with the DISTINCT clause
        
                            bool
    truncate()
        
    
    Truncate Action, empty the table
        
                            int
    insert(array $values)
        
    
    Insert Action
The data to be inserted into the database.
        
                            int
    insertAndGetLastId(array $values)
        
    
    InsertAndGetLastId action launches the insert and lastInsertId actions
        
                            mixed
    drop()
        
    
    Drop Action, remove the table
        
                            Collection
    paginate(int $number_of_page, int $current = 0, int $chunk = null)
        
    
    Paginate, make pagination system
        
                            bool
    exists(string $column = null, mixed $value = null)
        
    
    Check if rows exists
        
                            string
    getLastInsertId(string $name = null)
        
    
    Turn back the id of the last insertion
        
                            string
    jsonSerialize()
        
    
    JsonSerialize implementation
        
                            string
    toJson(int $option = 0)
        
    
    Transformation automatically the result to JSON
        
                            string
    toSql()
        
    
    Formats the select request
        
                            string
    getTable()
        
    
    Returns the name of the table.
        
                            string
    getPrefix()
        
    
    Returns the prefix.
        
                            
    setPrefix(string $prefix)
        
    
    Modify the prefix
        
                            QueryBuilder
    setTable(string $table)
        
    
    Change the table's name
        
                            
    setWhereDataBinding(array $data_binding)
        
    
    Define the data to associate
        
                            string
    __toString()
        
    
    __toString
        
                            
    setModel(string $model)
        
    
    Set model
        
                            string
    getModel()
        
    
    Get model