Dotclear 2.24
Loading...
Searching...
No Matches
dcJoinStatement Class Reference
Inheritance diagram for dcJoinStatement:
dcSqlStatement

Public Member Functions

 __construct ()
 
 type (string $type='')
 
 left ()
 
 right ()
 
 inner ()
 
 statement ()
 
- Public Member Functions inherited from dcSqlStatement
 __construct ()
 
 __get (string $property)
 
 __set (string $property, $value)
 
 __isset (string $property)
 
 __unset (string $property)
 
 __invoke ()
 
 statement ()
 
 columns ($c, bool $reset=false)
 
 fields ($c, bool $reset=false)
 
 column ($c, bool $reset=false)
 
 field ($c, bool $reset=false)
 
 from ($c, bool $reset=false, bool $first=false)
 
 where ($c, bool $reset=false)
 
 on ($c, bool $reset=false)
 
 cond ($c, bool $reset=false)
 
 and ($c, bool $reset=false)
 
 andGroup ($c)
 
 or ($c, bool $reset=false)
 
 orGroup ($c)
 
 sql ($c, bool $reset=false)
 
 escape (string $value)
 
 quote ($value, bool $escape=true)
 
 alias (string $name, string $alias)
 
 as (string $name, string $alias)
 
 in ($list, string $cast='')
 
 inSelect (string $field, dcSelectStatement $sql)
 
 dateFormat (string $field, string $pattern)
 
 like (string $field, string $pattern)
 
 regexp (string $value)
 
 unique (string $field)
 
 count (string $field, ?string $as=null, bool $unique=false)
 
 avg (string $field, ?string $as=null)
 
 max (string $field, ?string $as=null)
 
 min (string $field, ?string $as=null)
 
 sum (string $field, ?string $as=null)
 
 isNull (string $field)
 
 isNotNull (string $field)
 
 isSame (string $local, string $external)
 
 compare (string $external, bool $trigger_error=false, bool $dump=false, bool $print=false)
 

Protected Attributes

 $type
 
- Protected Attributes inherited from dcSqlStatement
const VERBOSE_SQL_ALIAS = false
 
 $con
 
 $syntax
 
 $_AS = ' '
 
 $columns = []
 
 $from = []
 
 $where = []
 
 $cond = []
 
 $sql = []
 

Detailed Description

Join (sub)Statement : small utility to build join query fragments

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Class constructor

Reimplemented from dcSqlStatement.

References type().

Member Function Documentation

◆ type()

type ( string  $type = '')

Defines the type for join

Parameters
string$type
Returns
self instance, enabling to chain calls

References $type, and type().

Referenced by __construct(), inner(), left(), right(), statement(), and type().

◆ left()

left ( )

Defines LEFT join type

Returns
dcJoinStatement

References type().

◆ right()

right ( )

Defines RIGHT join type

Returns
dcJoinStatement

References type().

◆ inner()

inner ( )

Defines INNER join type

Returns
dcJoinStatement

References type().

◆ statement()

statement ( )

Returns the join fragment

Returns
string the fragment

Reimplemented from dcSqlStatement.

References dcCore\app(), dcSqlStatement\cond(), dcSqlStatement\count(), dcSqlStatement\from(), dcSqlStatement\sql(), type(), and dcSqlStatement\where().

Field Documentation

◆ $type

$type
protected

Referenced by type().


The documentation for this class was generated from the following file: