Users.Vote Class
Class representing 'Vote' rows in the 'Users' database
Represents a vote by a user for something
Constructor
Users.Vote
(
-
fields
Parameters:
-
fields
ObjectThe 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:
-
query
Db.Query.MysqlThe query being excecuted
-
result
ObjectThe result of the query
-
error
ErrorError object if any
afterSaveExecute
(
-
query
-
result
-
error
Commit or rollback transaction when saving new vote
Parameters:
-
query
Db.Query.MysqlThe query being excecuted
-
result
ObjectThe result of the query
-
error
ErrorError object if any
beforeRemoveExecute
(
-
query
Update total votes in Users.Total when removing a vote
Parameters:
-
query
Db.Query.MysqlThe query being excecuted
beforeSaveExecute
(
-
query
-
modifiedFields
Update total votes in Users.Total when saving new vote
Parameters:
-
query
Db.Query.MysqlThe query being excecuted
-
modifiedFields
ObjectThe fields which are modified by query
setUp
()
The setUp() method is called the first time an object of this class is constructed.