|
| setCache (CacheManager $cache) |
|
| skipCache () |
|
| setCacheName (string $name) |
|
| select (array $columns) |
|
| update (array $columns) |
|
| __construct (Logger $logger, Config $config, Inflector $inflector, Builder $queryBuilder, Database $db, HooksContainer $hooks) |
|
| getPrimKey () |
|
| create (array $data) |
|
| select (array $columns) |
|
| update (array $columns) |
|
| delete () |
|
| where (string $column, $value, string $opr="=") |
|
| orWhere (string $column, $value, string $opr="=") |
|
| groupWhere (\Closure $predicates) |
|
| orGroupWhere (\Closure $predicates) |
|
| nestedWhere (string $column,\Closure $nested, string $lOpr="IN") |
|
| orNestedWhere (string $column,\Closure $nested, string $lOpr="IN") |
|
| join (string $table, string $type="INNER JOIN") |
|
| joinModel (BaseModel $model, string $forKey, string $type="INNER JOIN", string $cOpr="=") |
|
| joinCond (string $primKey, string $forKey, string $cOpr="=") |
|
| orJoinCond (string $primKey, string $forKey, string $cOpr="=") |
|
| joinCols (array $cols) |
|
| groupBy (string $col) |
|
| orderBy (string $col, string $direction="ASC", string $func="") |
|
| limit (int $limit, int $offset=0) |
|
| lastError () |
|
|
| $cache = null |
|
| $cacheName = "" |
|
| $skipCache = true |
|
| $primKey = "" |
|
| $logger = null |
|
| $config = null |
|
| $inflector = null |
|
| $qBuilder = null |
|
| $db = null |
|
| $error = null |
|
| $softDelete = false |
|
| $delCol = "" |
|
| $delValType = 0 |
|
| $timestamps = null |
|
| $createdColumn = "" |
|
| $updatedColumn = "" |
|
| $timestampFunction = "" |
|
| $hooks = null |
|
| $hookName = null |
|
SlaxWeb\Cache\Database\Model::select |
( |
array |
$columns | ) |
|
Checks if the cache contains a record for the desired query, and returns the cached result object.
SlaxWeb\Cache\Database\Model::setCache |
( |
CacheManager |
$cache | ) |
|
Set Cache
Sets the Cache Manager to the model that is used later to obtain and store data from and to cache.
- Parameters
-
\SlaxWeb\Cache\Manager | $cache | Cache Manager object |
- Returns
- self
SlaxWeb\Cache\Database\Model::setCacheName |
( |
string |
$name | ) |
|
Set Cache Name
Sets the cache name that will be included to the default cache name when writting to cache. If the cache name is set, the 'update' method will automatically remove this models cache for that name.
- Parameters
-
- Returns
- self
SlaxWeb\Cache\Database\Model::skipCache |
( |
| ) |
|
Skip cache
The next call to retrieve data will ignore cache, nor will it store the retrieved data to cache.
- Returns
- self
SlaxWeb\Cache\Database\Model::update |
( |
array |
$columns | ) |
|
If the 'cacheName' property is set, then the cached data that contanis that name will be removed.
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/cache-database/src/Model.php