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

Public Member Functions

 __construct ()
 
 into ($c, bool $reset=false)
 
 lines ($c, bool $reset=false)
 
 line ($c, bool $reset=false)
 
 statement ()
 
 insert ()
 
 run ()
 
- 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

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

Detailed Description

Insert Statement : small utility to build insert queries

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Class constructor

Reimplemented from dcSqlStatement.

References lines().

Member Function Documentation

◆ into()

into (   $c,
bool  $reset = false 
)

from() alias

Parameters
mixed$cthe into clause(s)
boolean$resetreset previous into first
Returns
self instance, enabling to chain calls

References dcSqlStatement\from().

◆ lines()

lines (   $c,
bool  $reset = false 
)

Adds update value(s)

Parameters
mixed$cthe insert values(s)
boolean$resetreset previous insert value(s) first
Returns
self instance, enabling to chain calls

References lines().

Referenced by __construct(), line(), lines(), and statement().

◆ line()

line (   $c,
bool  $reset = false 
)

line() alias

Parameters
mixed$cthe insert value(s)
boolean$resetreset previous insert value(s) first
Returns
self instance, enabling to chain calls

References lines().

◆ statement()

statement ( )

Returns the insert statement

Returns
string the statement

Reimplemented from dcSqlStatement.

References dcCore\app(), dcSqlStatement\as(), dcSqlStatement\columns(), dcSqlStatement\count(), dcSqlStatement\from(), and lines().

Referenced by insert().

◆ insert()

insert ( )

Run the SQL select query and return result

Returns
bool true

References dcSqlStatement\$sql, and statement().

Referenced by run().

◆ run()

run ( )

insert() alias

Returns
bool

References insert().

Field Documentation

◆ $lines

$lines
protected

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