64 return $this->db->insertData($insert) !==
false;
75 ->andWhere($select->expr()->isNull(
'worker'))
76 ->orderBy(
'id',
'ASC')
79 $row = $this->db->getDataRow($select);
88 ->andWhere($update->compare(
'id',
'=', $row->id,
ELGG_VALUE_ID))
89 ->andWhere($update->expr()->isNull(
'worker'));
91 if ($this->db->updateData($update,
true) !== 1) {
101 return unserialize($row->data);
111 $this->db->deleteData(
$delete);
119 $select->select(
'COUNT(*) AS total')
122 $result = $this->db->getDataRow($select);
static table($table, $alias=null)
{}
clear()
{Clear all items from the queue.void}
__construct(string $name,\Elgg\Database $db)
Create a queue.
trait TimeUsing
Adds methods for setting the current time (for testing)
dequeue()
{Remove an item from the queue.mixed}
getCurrentTime($modifier= '')
Get the (cloned) time.
FIFO queue that uses the database for persistence.
static intoTable($table)
{}
size()
{Get the size of the queue.int}
const ELGG_VALUE_TIMESTAMP
static fromTable($table, $alias=null)
{}
enqueue($item)
{Add an item to the queue.Item to add to queue bool}
static fromTable($table, $alias=null)
{}