Sgss_Collection_TableRow_Abstract
+ Sgss_Collection_Pdo_TableRow
| Sgss_Collection_Pdo_TableRow_Prepared | Represents a row prepared to be inserted into a database table |
|
$_columns
Column names defined in the database schema |
|
$_config
Config to connect to the database |
|
$_db
Database handle used with this row |
|
$_driver
Driver name of the database handle |
|
$_id
Row identifier of this row |
|
$_row
Name of the column containing row identifiers that already exists in the database |
|
$_table
Name of the table that already exists in the database |
|
__construct (array|PDO $config, string $table, string $row, array $columns, mixed $id)
The constructor |
boolean |
delete (mixed $column)
Deletes the value at the specified column of this row |
mixed |
get (mixed $column)
Returns the value at the specified column of this row |
boolean |
has (mixed $column)
Determines the specified column identifier is defined in the table containing this row |
boolean |
insert ()
Inserts or replaces this row into the containing table |
boolean |
remove ()
Removes this row from the containing table |
boolean |
set (mixed $column, mixed $value)
Inserts or replaces the specified value into the specified column of this row |
array |
toArray ()
Converts this row to an associated array |
|
_connect ()
Connects to the database |
|
_quoteName (string|array $name)
Quotes the specified table or column name |
|
_sopite (mixed $obj, [boolean $key = false])
Converts the specified object to the corresponding scalar value |
|
_waken (scalar $scalar, [boolean $key = false])
Converts the specified scalar value to the corresponding object |
array |
__sleep ()
|
void |
__wakeup ()
|
Column names defined in the database schema
protected array $_columns
Config to connect to the database
protected array $_config = array(...)
Database handle used with this row
protected PDO $_db
Driver name of the database handle
protected string $_driver = ''
Row identifier of this row
protected array $_id
Name of the column containing row identifiers that already exists in the database
protected string $_row
Name of the table that already exists in the database
protected string $_table
The constructor
array|PDO $config
Config to connect to the database used with the row
string $table
Name of the table that already exists in the database
string $row
Name of the column containing row identifiers that already exists in the database
array $columns
Column names defined in the database schema
mixed $id
Row identifier of the row
When the $columns contains no element
public __construct (array|PDO $config, string $table, string $row, array $columns, mixed $id)
Deletes the value at the specified column of this row
mixed $column
Column identifier from which the value to be removed
Deletes the value at the specified column of this row
public boolean delete (mixed $column)
Returns the value at the specified column of this row
mixed $column
Column identifier from which the value to be retrieved
When unable to prepare statement
Returns the value at the specified column of this row
public mixed get (mixed $column)
Determines the specified column identifier is defined in the table containing this row
mixed $column
Column identifier to determine
public boolean has (mixed $column)
Inserts or replaces this row into the containing table
Inserts or replaces this row into the containing table
public boolean insert ()
Removes this row from the containing table
When unable to prepare statement
Removes this row from the containing table
public boolean remove ()
Inserts or replaces the specified value into the specified column of this row
mixed $column
Column identifier into which the value to be inserted
mixed $value
Value to be inserted into the specified column of this row
When unable to prepare statement
Inserts or replaces the specified value into the specified column of this row
public boolean set (mixed $column, mixed $value)
Converts this row to an associated array
When unable to prepare statement
Converts this row to an associated array
public array toArray ()
Connects to the database
When unable to connect to the database
protected void _connect ()
Quotes the specified table or column name
string|array $name
Column or table name or its array to be quoted
protected string|array _quoteName (string|array $name)
Converts the specified object to the corresponding scalar value
mixed $obj
Object to be converted to scalar
boolean $key
Whether the object is used as the key
When the object is or contains unconvertable to scalar (resource or internal class)
protected scalar _sopite (mixed $obj, [boolean $key = false])
Converts the specified scalar value to the corresponding object
scalar $scalar
Scalar value to be converted to object
boolean $key
Whether the converted object is to be used as the key
protected mixed _waken (scalar $scalar, [boolean $key = false])
When this row is unserializable
public array __sleep ()
public void __wakeup ()