| Fully Qualified Name: | CodeIgniter\Test\Mock\MockQuery |
| Extends: | Query |
| Name | Description | Defined By |
|---|---|---|
| __construct() | BaseQuery constructor. | Query |
| __toString() | Return text representation of the query | Query |
| getDuration() | Returns the duration of this query during execution, or null if the query has not been executed yet. | Query |
| getErrorCode() | Returns the error code created while executing this statement. | Query |
| getErrorMessage() | Returns the error message created while executing this statement. | Query |
| getOriginalQuery() | Returns the original SQL that was passed into the system. | Query |
| getQuery() | Returns the final, processed query string after binding, etal has been performed. | Query |
| getStartTime() | Returns the start time in seconds with microseconds. | Query |
| hasError() | Reports whether this statement created an error not. | Query |
| isWriteType() | Determines if the statement is a write-type query or not. | Query |
| setBinds() | Will store the variables to bind into the query later. | Query |
| setDuration() | Records the execution time of the statement using microtime(true) for it's start and end values. If no end value is present, will use the current time to determine total duration. | Query |
| setError() | Stores the error description that happened for this query. | Query |
| setQuery() | Sets the raw query string to use for this statement. | Query |
| swapPrefix() | Swaps out one table prefix for a new one. | Query |
BaseQuery constructor.
| Parameter Name | Type | Description |
|---|---|---|
| $db | ||
| $db |
Returns:
Return text representation of the query
Returns: string
Returns the duration of this query during execution, or null if the query has not been executed yet.
| Parameter Name | Type | Description |
|---|---|---|
| $decimals | int | The |
Returns: string
Returns the error code created while executing this statement.
Returns: int
Returns the error message created while executing this statement.
Returns: string
Returns the original SQL that was passed into the system.
Returns: string
Returns the final, processed query string after binding, etal has been performed.
Returns: string
Returns the start time in seconds with microseconds.
| Parameter Name | Type | Description |
|---|---|---|
| $returnRaw | bool | |
| $decimals | int |
Returns: string
Reports whether this statement created an error not.
Returns: bool
Determines if the statement is a write-type query or not.
Returns: bool
Will store the variables to bind into the query later.
| Parameter Name | Type | Description |
|---|---|---|
| $binds | array |
Returns: $this
Records the execution time of the statement using microtime(true) for it's start and end values. If no end value is present, will use the current time to determine total duration.
| Parameter Name | Type | Description |
|---|---|---|
| $start | float | |
| $end | float |
Returns: $this
Stores the error description that happened for this query.
| Parameter Name | Type | Description |
|---|---|---|
| $code | int | |
| $error | string |
Returns: $this
Sets the raw query string to use for this statement.
| Parameter Name | Type | Description |
|---|---|---|
| $sql | string | |
| $binds | mixed | |
| $setEscape | bool |
Returns: $this
Swaps out one table prefix for a new one.
| Parameter Name | Type | Description |
|---|---|---|
| $orig | string | |
| $swap | string |
Returns: $this