abstract class AbstractRepository implements RepositoryInterface

Class AbstractRepository

Constants

TABLE_NAME

PRIMARY_KEY_COLUMN

Properties

protected Connection $db

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

Details

at line 28
__construct(Connection $db)

Parameters

Connection $db

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

Executes the SQL insert statement

Parameters

array $data

Return Value

bool|int

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

Parameters

string $tableName

Return Value

string

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

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

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

at line 130
array getOneById(int $entryId)

Parameters

int $entryId

Return Value

array