| Methods |
public
|
__construct(string|array<string, mixed> $template = [], array<int|string, mixed> $arguments = [])
Specifying options to constructors will override default
attribute values of this class.
Specifying options to constructors will override default
attribute values of this class.
|
#
|
public
|
getDsqlExpression(self $expression): $this
|
#
|
public
|
offsetExists($offset): bool
|
#
|
public
|
offsetGet($offset)
Actually this should be return by ref but atm cannot be.
Actually this should be return by ref but atm cannot be.
Implements
|
#
|
public
|
offsetSet($offset, $value): void
|
#
|
public
|
offsetUnset($offset): void
|
#
|
public
|
expr(string|array<string, mixed> $template = [], array<int|string, mixed> $arguments = []): self
Create Expression object with the same connection.
Create Expression object with the same connection.
Overriden by
|
#
|
public
|
reset(string $tag = null): $this
Resets arguments.
|
#
|
protected
|
consume(string|Expressionable $expr, self::ESCAPE_* $escapeMode): string
Recursively renders sub-query or expression, combining parameters.
Recursively renders sub-query or expression, combining parameters.
Returns
|
#
|
protected
|
escapeParam(string|int|float $value): string
Converts value into parameter and returns reference. Use only during
query rendering. Consider using `consume()`…
Converts value into parameter and returns reference. Use only during
query rendering. Consider using consume() instead, which will
also handle nested expressions properly.
Returns
|
#
|
protected
|
escapeStringLiteral(string $value): string
This method should be used only when string value cannot be bound.
This method should be used only when string value cannot be bound.
|
#
|
protected
|
escapeIdentifier(string $value): string
Escapes identifier from argument.
This will allow you to use reserved SQL words as table or field
names such as "table"…
Escapes identifier from argument.
This will allow you to use reserved SQL words as table or field
names such as "table" as well as other characters that SQL
permits in the identifiers (e.g. spaces or equation signs).
|
#
|
protected
|
escapeIdentifierSoft(string $value): string
Soft-escaping SQL identifier. This method will attempt to put
escaping char around the identifier, however will not do…
Soft-escaping SQL identifier. This method will attempt to put
escaping char around the identifier, however will not do so if you
are using special characters like ".", "(" or escaping char.
It will smartly escape table.field type of strings resulting
in "table"."field".
|
#
|
protected
|
isUnescapableIdentifier(string $value): bool
Given the string parameter, it will detect some "deal-breaker" for our
soft escaping, such as "*" or "(".
Given the string parameter, it will detect some "deal-breaker" for our
soft escaping, such as "*" or "(".
|
#
|
private
|
_render(): array{string, array<string, mixed>}
|
#
|
public
|
render(): array{string, array<string, mixed>}
Render expression to an array with SQL string and its params.
Render expression to an array with SQL string and its params.
Overriden by
|
#
|
protected
|
renderNested(): array{string, array<string, mixed>}
|
#
|
public
|
getDebugQuery(): string
Return formatted debug SQL query.
Return formatted debug SQL query.
|
#
|
public
|
__debugInfo(): array<string, mixed>
|
#
|
protected
|
hasNativeNamedParamSupport(): bool
|
#
|
protected
|
updateRenderBeforeExecute(array{string, array<string, mixed>} $render): array{string, array<string, mixed>}
|
#
|
protected
|
_executeStatement(
Statement $statement,
bool $fromExecuteStatement,
): ($fromExecuteStatement is true ? int<0, max> : Result)
|
#
|
protected
|
_execute(
Connection|Connection $connection,
bool $fromExecuteStatement,
): ($fromExecuteStatement is true ? int<0, max> : Result)
|
#
|
public
|
executeQuery(Connection|Connection $connection = null): Result
|
#
|
public
|
executeStatement(Connection|Connection $connection = null): int<0, max>
|
#
|
final
public
static
|
castFloatToString(float $value): string
Cast float to string with lossless precision.
Cast float to string with lossless precision.
|
#
|
private
|
castGetValue(string|int|float|bool|null $v): ?string
|
#
|
public
|
getRowsIterator(): Traversable<array<string, mixed>>
|
#
|
public
|
getRows(): array<int, array<string, string|null>>
Executes expression and return whole result-set in form of array of hashes.
Executes expression and return whole result-set in form of array of hashes.
|
#
|
public
|
getRow(): array<string, string|null>|null
Executes expression and returns first row of data from result-set as a hash.
Executes expression and returns first row of data from result-set as a hash.
|
#
|
public
|
getOne(): ?string
Executes expression and return first value of first row of data from result-set.
Executes expression and return first value of first row of data from result-set.
|
#
|