Users.Vote Class
Class representing 'Vote' rows in the 'Users' database
Represents a vote by a user for something
Constructor
Users.Vote
(
-
fields
Parameters:
-
fieldsObjectThe fields values to initialize table row as an associative array of
{column: value}pairs
Item Index
Methods
afterRemoveExecute
(
-
query -
result -
error
Commit or rollback transaction when deleting a vote
Parameters:
-
queryDb.Query.MysqlThe query being excecuted -
resultObjectThe result of the query -
errorErrorError object if any
afterSaveExecute
(
-
query -
result -
error
Commit or rollback transaction when saving new vote
Parameters:
-
queryDb.Query.MysqlThe query being excecuted -
resultObjectThe result of the query -
errorErrorError object if any
beforeRemoveExecute
(
-
query
Update total votes in Users.Total when removing a vote
Parameters:
-
queryDb.Query.MysqlThe query being excecuted
beforeSaveExecute
(
-
query -
modifiedFields
Update total votes in Users.Total when saving new vote
Parameters:
-
queryDb.Query.MysqlThe query being excecuted -
modifiedFieldsObjectThe fields which are modified by query
setUp
()
The setUp() method is called the first time an object of this class is constructed.