Function DatabaseDriver->cast
Definitions
sources/database.php
- Create an SQL cast.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$field | string | No | No | required parameter | N/A | N/A | The field identifier |
$type | string | No | No | required parameter | CHAR INT FLOAT | N/A | The type wanted |
Returns
- The database type
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Create an SQL cast.
*
* @param string $field The field identifier
* @param string $type The type wanted
* @set CHAR INT FLOAT
* @return string The database type
*/
public function cast(string $field, string $type) : string
* Create an SQL cast.
*
* @param string $field The field identifier
* @param string $type The type wanted
* @set CHAR INT FLOAT
* @return string The database type
*/
public function cast(string $field, string $type) : string