SqlTrackerQuery implements ArrayAccess
Table of Contents
Interfaces
- ArrayAccess
Methods
- __construct() : mixed
- addLength() : void
- Adds fetched row size to the query statistic.
- addTime() : void
- Increments sql execution time.
- finishQuery() : void
- Ends sql timer.
- getBinds() : array<string|int, mixed>|null
- Returns sql binds used for query execution.
- getFetchedRowsCount() : int
- Returns the number of the fetched rows.
- getLength() : float|int
- Returns size of the fetched rows.
- getNode() : string
- Returns sql connection node id of the query.
- getSelectedFieldsCount() : int
- Returns the fields number.
- getSelectedRowsCount() : int
- Returns selected rows count.
- getSql() : string
- Returns tracked sql text.
- getState() : string
- Returns page state of the query.
- getTime() : float
- Returns sql execution time.
- getTrace() : array<string|int, mixed>|null
- Returns backtrace of the query.
- hasBigFields() : bool
- incrementFetched() : void
- Increments the number of fetched rows.
- offsetExists() : bool
- Whether an offset exists.
- offsetGet() : mixed
- Offset to retrieve.
- offsetSet() : void
- Offset to set.
- offsetUnset() : void
- Offset to unset.
- refinishQuery() : void
- Finishes query timer one more time.
- restartQuery() : void
- Resets sql timer start.
- setBinds() : SqlTrackerQuery
- Sets tracked sql binds.
- setHasBigFields() : mixed
- setNode() : SqlTrackerQuery
- Sets tracked sql connection node id.
- setSelectedFieldsCount() : void
- Sets the fields number in the result.
- setSelectedRowsCount() : void
- Sets selected rows count.
- setSql() : SqlTrackerQuery
- Sets tracked sql text.
- setState() : SqlTrackerQuery
- Sets tracked sql page state.
- setTime() : SqlTrackerQuery
- Sets tracked sql execution time.
- setTrace() : SqlTrackerQuery
- Sets tracked sql backtrace.
- startQuery() : void
- Starts sql timer.
Methods
__construct()
public
__construct(SqlTracker $tracker) : mixed
Parameters
- $tracker : SqlTracker
-
This sql tracker.
addLength()
Adds fetched row size to the query statistic.
public
addLength(int $length) : void
Parameters
- $length : int
addTime()
Increments sql execution time.
public
addTime(float $time) : void
Parameters
- $time : float
-
Time in seconds to add.
finishQuery()
Ends sql timer.
public
finishQuery([int $skip = 3 ]) : void
Parameters
- $skip : int = 3
-
How many backtrace skip. By default 3.
getBinds()
Returns sql binds used for query execution.
public
getBinds() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetFetchedRowsCount()
Returns the number of the fetched rows.
public
getFetchedRowsCount() : int
Return values
intgetLength()
Returns size of the fetched rows.
public
getLength() : float|int
Return values
float|intgetNode()
Returns sql connection node id of the query.
public
getNode() : string
Return values
stringgetSelectedFieldsCount()
Returns the fields number.
public
getSelectedFieldsCount() : int
Return values
intgetSelectedRowsCount()
Returns selected rows count.
public
getSelectedRowsCount() : int
Return values
intgetSql()
Returns tracked sql text.
public
getSql() : string
Return values
stringgetState()
Returns page state of the query.
public
getState() : string
Return values
stringgetTime()
Returns sql execution time.
public
getTime() : float
Return values
floatgetTrace()
Returns backtrace of the query.
public
getTrace() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullhasBigFields()
public
hasBigFields() : bool
Return values
boolincrementFetched()
Increments the number of fetched rows.
public
incrementFetched() : void
offsetExists()
Whether an offset exists.
public
offsetExists(mixed $offset) : bool
Part of ArrayAccess implementation made for backward compatibility.
Parameters
- $offset : mixed
-
Array key.
Return values
booloffsetGet()
Offset to retrieve.
public
offsetGet(mixed $offset) : mixed
Part of ArrayAccess implementation made for backward compatibility.
Parameters
- $offset : mixed
-
Array key.
Attributes
- #[ReturnTypeWillChange]
offsetSet()
Offset to set.
public
offsetSet(mixed $offset, mixed $value) : void
Part of ArrayAccess implementation made for backward compatibility.
Parameters
- $offset : mixed
-
Array key.
- $value : mixed
-
Array value.
offsetUnset()
Offset to unset.
public
offsetUnset(mixed $offset) : void
Part of ArrayAccess implementation made for backward compatibility.
Parameters
- $offset : mixed
-
Array key.
refinishQuery()
Finishes query timer one more time.
public
refinishQuery() : void
Use with restartQuery.
Tags
restartQuery()
Resets sql timer start.
public
restartQuery() : void
combined with refinishQuery allows additional time to be included into execution.
Tags
setBinds()
Sets tracked sql binds.
public
setBinds(array<string|int, mixed> $binds) : SqlTrackerQuery
Returns the object for call chaining.
Parameters
- $binds : array<string|int, mixed>
-
Sql binds.
Return values
SqlTrackerQuerysetHasBigFields()
public
setHasBigFields(bool $value) : mixed
Parameters
- $value : bool
setNode()
Sets tracked sql connection node id.
public
setNode(string $node) : SqlTrackerQuery
Returns the object for call chaining.
Parameters
- $node : string
-
Cluster node identifier.
Return values
SqlTrackerQuerysetSelectedFieldsCount()
Sets the fields number in the result.
public
setSelectedFieldsCount(int $count) : void
Parameters
- $count : int
setSelectedRowsCount()
Sets selected rows count.
public
setSelectedRowsCount(int $count) : void
Parameters
- $count : int
setSql()
Sets tracked sql text.
public
setSql(string $sql) : SqlTrackerQuery
Returns the object for call chaining.
Parameters
- $sql : string
-
Sql text.
Return values
SqlTrackerQuerysetState()
Sets tracked sql page state.
public
setState(string $state) : SqlTrackerQuery
Returns the object for call chaining.
Parameters
- $state : string
-
Page state.
Return values
SqlTrackerQuerysetTime()
Sets tracked sql execution time.
public
setTime(float $time) : SqlTrackerQuery
Returns the object for call chaining.
Parameters
- $time : float
-
Sql execution time in seconds.
Return values
SqlTrackerQuerysetTrace()
Sets tracked sql backtrace.
public
setTrace([array<string|int, mixed>|null $trace = null ]) : SqlTrackerQuery
Returns the object for call chaining.
Parameters
- $trace : array<string|int, mixed>|null = null
-
Query backtrace.
Return values
SqlTrackerQuerystartQuery()
Starts sql timer.
public
startQuery(string $sql[, array<string|int, mixed>|null $binds = null ]) : void
Parameters
- $sql : string
-
Query text.
- $binds : array<string|int, mixed>|null = null
-
Binded variables used with query.