Table of Contents
Properties
-
$sql
: string
-
$statement
: PDOStatement|null
Methods
-
deleteFrom()
: Query
-
drop()
: Query
-
execute()
: Query
-
executeWith()
: Query
-
fetch()
: mixed
-
fetchAll()
: array<string|int, array<string|int, mixed>>
-
fetchAllFrom()
: array<string|int, array<string|int, mixed>>
-
fetchFrom()
: mixed
-
fromSqlFile()
: Query
-
fromString()
: Query
-
getSQL()
: string
-
getStatement()
: PDOStatement
-
insertInto()
: Query
-
prepare()
: Query
-
selectAllFrom()
: Query
-
selectRowFrom()
: Query
-
truncate()
: Query
-
updateIn()
: Query
-
__construct()
: mixed
$sql
private
string
$sql
$statement
private
PDOStatement|null
$statement
= null
deleteFrom()
public
static deleteFrom(Table $table[, string $primaryKey = 'id' ]) : Query
Parameters
-
$table
: Table
-
-
$primaryKey
: string
= 'id'
-
drop()
public
static drop(Table $table) : Query
Parameters
-
$table
: Table
-
execute()
public
execute([array<string, mixed>|array<string|int, mixed>|null $params = null ]) : Query
Parameters
-
$params
: array<string, mixed>|array<string|int, mixed>|null
= null
-
executeWith()
public
executeWith(PDO $pdo[, array<string, mixed>|array<string|int, mixed>|null $params = null ]) : Query
Parameters
-
$pdo
: PDO
-
-
$params
: array<string, mixed>|array<string|int, mixed>|null
= null
-
fetch()
public
fetch([int $mode = PDO::FETCH_ASSOC ]) : mixed
Parameters
-
$mode
: int
= PDO::FETCH_ASSOC
-
fetchAll()
public
fetchAll([int $mode = PDO::FETCH_ASSOC ]) : array<string|int, array<string|int, mixed>>
Parameters
-
$mode
: int
= PDO::FETCH_ASSOC
-
Return values
array<string|int, array<string|int, mixed>>
fetchAllFrom()
public
fetchAllFrom(PDO $pdo[, array<string, mixed>|array<string|int, mixed>|null $params = null ][, int $mode = PDO::FETCH_ASSOC ]) : array<string|int, array<string|int, mixed>>
Parameters
-
$pdo
: PDO
-
-
$params
: array<string, mixed>|array<string|int, mixed>|null
= null
-
-
$mode
: int
= PDO::FETCH_ASSOC
-
Return values
array<string|int, array<string|int, mixed>>
fetchFrom()
public
fetchFrom(PDO $pdo[, array<string, mixed>|array<string|int, mixed>|null $params = null ][, int $mode = PDO::FETCH_ASSOC ]) : mixed
Parameters
-
$pdo
: PDO
-
-
$params
: array<string, mixed>|array<string|int, mixed>|null
= null
-
-
$mode
: int
= PDO::FETCH_ASSOC
-
fromSqlFile()
public
static fromSqlFile(string $pathToFile) : Query
Parameters
-
$pathToFile
: string
-
fromString()
public
static fromString(string $sqlString) : Query
Parameters
-
$sqlString
: string
-
getSQL()
public
getSQL() : string
getStatement()
public
getStatement() : PDOStatement
Return values
PDOStatement
insertInto()
public
static insertInto(Table $table) : Query
Parameters
-
$table
: Table
-
prepare()
public
prepare(PDO $pdo) : Query
Parameters
-
$pdo
: PDO
-
selectAllFrom()
public
static selectAllFrom(Table $table) : Query
Parameters
-
$table
: Table
-
selectRowFrom()
public
static selectRowFrom(Table $table) : Query
Parameters
-
$table
: Table
-
truncate()
public
static truncate(Table $table) : Query
Parameters
-
$table
: Table
-
updateIn()
public
static updateIn(Table $table[, string $primaryKey = 'id' ]) : Query
Parameters
-
$table
: Table
-
-
$primaryKey
: string
= 'id'
-
__construct()
private
__construct(string $sql) : mixed
Parameters
-
$sql
: string
-