DB class
Managing database operations
package | Default |
---|
__clone() : void
\Exception |
Thrown in when __clone is called |
---|
beginTransaction() : void
commit() : void
connection(string $dbconfig = 'database'
) : \Kore\DB
fluent | This method is part of a fluent interface and will return the same instance |
---|
string
DB configuration key
\Kore\DB
DB instancecount(string $query, \Kore\array<mixed> $params = array()
) : mixed
string
SQL query
\Kore\array<mixed>
SQL query parameters
mixed
query resultsdelete(string $query, \Kore\array<mixed> $params = array()
) : integer
string
SQL query
\Kore\array<mixed>
SQL query parameters
integer
number of deleted recordsexecute(string $query, \Kore\array<mixed> $params = array()
) : \PDOStatement
string
SQL query
\Kore\array<mixed>
SQL query parameters
\PDOStatement
\PDOStatement objectgetInClause(string $marker, \Kore\array<mixed> $values) : \Kore\array<mixed>
string
parameter marker
\Kore\array<mixed>
value specified in the IN clause
\Kore\array<mixed>
IN clause information
array(
'IN (:MARKER_0, :MARKER_1, :MARKER_2)',
array(
'MARKER_0' => 'value',
'MARKER_1' => 'value',
'MARKER_2' => 'value'
)
)getPdo() : \PDO
\PDO
PDO instanceinsert(string $query, \Kore\array<mixed> $params = array()
) : string
string
SQL query
\Kore\array<mixed>
SQL query parameters
string
last insert IDrollback() : void
select(string $query, \Kore\array<mixed> $params = array()
) : \Kore\array<mixed>
string
SQL query
\Kore\array<mixed>
SQL query parameters
\Kore\array<mixed>
query resultsselectFirst(string $query, \Kore\array<mixed> $params = array()
) : \Kore\array<mixed>
string
SQL query
\Kore\array<mixed>
SQL query parameters
\Kore\array<mixed>
query resultstransaction(callable $callback) : void
Rollback if an exception is raised in the callback.
callable
callback processing
\Exception |
---|
update(string $query, \Kore\array<mixed> $params = array()
) : integer
string
SQL query
\Kore\array<mixed>
SQL query parameters
integer
number of updated recordsconnect(string $dbconfig) : void
string
DB configuration key
\Exception |
Thrown in when the DB configuration does not exist |
---|---|
\PDOException |
Thrown when DB access fails |
__construct(string $dbconfig) : void
string
DB configuration key
dataType(mixed $value) : integer
mixed
variable
integer
data_typedebugValue(mixed $value) : mixed
mixed
variable
mixed
debug value$pdo : \PDO