ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct () | |
Initialize the SQL data store. More... | |
getTableVersion ($name) | |
Get table version. More... | |
setTableVersion ($name, $version) | |
Set table version. More... | |
insertOrUpdate ($table, array $keys, array $data) | |
Insert or update a key-value in the store. More... | |
get ($type, $key) | |
Retrieve a value from the data store. More... | |
set ($type, $key, $value, $expire=null) | |
Save a value in the data store. More... | |
delete ($type, $key) | |
Delete an entry from the data store. More... | |
Public Member Functions inherited from SimpleSAML\Store | |
get ($type, $key) | |
Retrieve a value from the data store. More... | |
set ($type, $key, $value, $expire=null) | |
Save a value to the data store. More... | |
delete ($type, $key) | |
Delete a value from the data store. More... | |
Data Fields | |
$pdo | |
$driver | |
$prefix | |
Private Member Functions | |
initTableVersionTable () | |
Initialize the table-version table. More... | |
initKVTable () | |
Initialize key-value table. More... | |
cleanKVStore () | |
Clean the key-value table of expired entries. More... | |
Private Attributes | |
$tableVersions | |
Additional Inherited Members | |
Static Public Member Functions inherited from SimpleSAML\Store | |
static | getInstance () |
Retrieve our singleton instance. More... | |
SimpleSAML\Store\SQL::__construct | ( | ) |
Initialize the SQL data store.
Definition at line 51 of file SQL.php.
References $config, $dsn, PHPMailer\PHPMailer\$options, $password, SimpleSAML\Store\SQL\initKVTable(), and SimpleSAML\Store\SQL\initTableVersionTable().
|
private |
Clean the key-value table of expired entries.
Definition at line 270 of file SQL.php.
References PHPMailer\PHPMailer\$params, $query, and SimpleSAML\Logger\debug().
Referenced by SimpleSAML\Store\SQL\set().
SimpleSAML\Store\SQL::delete | ( | $type, | |
$key | |||
) |
SimpleSAML\Store\SQL::get | ( | $type, | |
$key | |||
) |
Retrieve a value from the data store.
string | $type | The type of the data. |
string | $key | The key to retrieve. |
Definition at line 290 of file SQL.php.
References $key, PHPMailer\PHPMailer\$params, $query, $row, and $type.
SimpleSAML\Store\SQL::getTableVersion | ( | $name | ) |
Get table version.
string | $name | Table name. |
Definition at line 171 of file SQL.php.
References $name.
Referenced by SimpleSAML\Store\SQL\initKVTable().
|
private |
Initialize key-value table.
Queries for updates, grouped by version. New updates can be added as a new array in this array
This upgrade removes the default NOT NULL constraint on the _expire field in MySQL. Because SQLite does not support field alterations, the approach is to: Create a new table without the NOT NULL constraint Copy the current data to the new table Drop the old table Rename the new table correctly Readd the index
Definition at line 104 of file SQL.php.
References $query, SimpleSAML\Store\SQL\getTableVersion(), and SimpleSAML\Store\SQL\setTableVersion().
Referenced by SimpleSAML\Store\SQL\__construct().
|
private |
Initialize the table-version table.
Definition at line 81 of file SQL.php.
References $row.
Referenced by SimpleSAML\Store\SQL\__construct().
SimpleSAML\Store\SQL::insertOrUpdate | ( | $table, | |
array | $keys, | ||
array | $data | ||
) |
Insert or update a key-value in the store.
Since various databases implement different methods for doing this, we abstract it away here.
string | $table | The table we should update. |
array | $keys | The key columns. |
array | $data | Associative array with columns. |
Definition at line 212 of file SQL.php.
References $query, $table, $values, and SimpleSAML\Logger\error().
Referenced by SimpleSAML\Store\SQL\set(), and SimpleSAML\Store\SQL\setTableVersion().
SimpleSAML\Store\SQL::set | ( | $type, | |
$key, | |||
$value, | |||
$expire = null |
|||
) |
Save a value in the data store.
string | $type | The type of the data. |
string | $key | The key to insert. |
mixed | $value | The value itself. |
int | null | $expire | The expiration time (unix timestamp), or null if it never expires. |
Definition at line 333 of file SQL.php.
References $data, $type, SimpleSAML\Store\SQL\cleanKVStore(), and SimpleSAML\Store\SQL\insertOrUpdate().
SimpleSAML\Store\SQL::setTableVersion | ( | $name, | |
$version | |||
) |
Set table version.
string | $name | Table name. |
int | $version | Table version. |
Definition at line 189 of file SQL.php.
References $name, $version, and SimpleSAML\Store\SQL\insertOrUpdate().
Referenced by SimpleSAML\Store\SQL\initKVTable().