class VoteRepository extends AbstractRepository

Class VoteRepository

Constants

TABLE_NAME

PRIMARY_KEY_COLUMN

Properties

protected Connection $db from AbstractRepository

Methods

__construct(Connection $db)

No description

bool|int
insert(array $data)

Executes the SQL insert statement

string
getTableName(string $tableName = '')

No description

bool|int
delete(int|array $entryId, string $columnName = self::PRIMARY_KEY_COLUMN)

Executes the SQL delete statement

bool|int
update(array $data, int|array $entryId)

Executes the SQL update statement

string
buildLimitStmt(int|string $limitStart = '', int|string $resultsPerPage = '')

Build the SQL limit

array
getOneById(int $entryId)

No description

int
getVotesByUserId(int $pollId, int $userId, string $ipAddress)

No description

int
getVotesByIpAddress(int $pollId, string $ipAddress)

No description

Details

in AbstractRepository at line 28
__construct(Connection $db)

Parameters

Connection $db

in AbstractRepository at line 39
bool|int insert(array $data)

Executes the SQL insert statement

Parameters

array $data

Return Value

bool|int

in AbstractRepository at line 55
string getTableName(string $tableName = '')

Parameters

string $tableName

Return Value

string

in AbstractRepository at line 67
bool|int delete(int|array $entryId, string $columnName = self::PRIMARY_KEY_COLUMN)

Executes the SQL delete statement

Parameters

int|array $entryId
string $columnName

Return Value

bool|int

in AbstractRepository at line 95
bool|int update(array $data, int|array $entryId)

Executes the SQL update statement

Parameters

array $data
int|array $entryId

Return Value

bool|int

in AbstractRepository at line 114
protected string buildLimitStmt(int|string $limitStart = '', int|string $resultsPerPage = '')

Build the SQL limit

Parameters

int|string $limitStart
int|string $resultsPerPage

Return Value

string

in AbstractRepository at line 130
array getOneById(int $entryId)

Parameters

int $entryId

Return Value

array

at line 26
int getVotesByUserId(int $pollId, int $userId, string $ipAddress)

Parameters

int $pollId
int $userId
string $ipAddress

Return Value

int

at line 37
int getVotesByIpAddress(int $pollId, string $ipAddress)

Parameters

int $pollId
string $ipAddress

Return Value

int