PHP Database

CrudInterface

Describes CRUD interface.

Table of Contents

Methods

count()  : int
Retrieve total existing record.
delete()  : static
Return an instance with deleted record.
insert()  : static
Return an instance with inserted new record.
record()  : array<string, mixed>
Retrieve single row record from query command.
select()  : array<string|int, array<string, mixed>>
Retrieve multiple row records from query command.
update()  : static
Return an instance with updated record.

Methods

count()

Retrieve total existing record.

public count(array<string, mixed> $Data) : int
Parameters
$Data : array<string, mixed>

The count data.

Tags
throws
DatabaseException

If error.

throws
ValidationException

If invalid.

Return values
int

delete()

Return an instance with deleted record.

public delete(array<string, mixed> $Data) : static
Parameters
$Data : array<string, mixed>

The delete data.

Tags
throws
DatabaseException

If error.

throws
ValidationException

If invalid.

Return values
static

insert()

Return an instance with inserted new record.

public insert(array<string, mixed> $Data) : static
Parameters
$Data : array<string, mixed>

The create data.

Tags
throws
DatabaseException

If error.

throws
ValidationException

If invalid.

Return values
static

record()

Retrieve single row record from query command.

public record(array<string, mixed> $Data) : array<string, mixed>
Parameters
$Data : array<string, mixed>

The read data.

Tags
throws
DatabaseException

If error.

throws
ValidationException

If invalid.

Return values
array<string, mixed>

select()

Retrieve multiple row records from query command.

public select(array<string, mixed> $Data) : array<string|int, array<string, mixed>>
Parameters
$Data : array<string, mixed>

The read data.

Tags
throws
DatabaseException

If error.

throws
ValidationException

If invalid.

Return values
array<string|int, array<string, mixed>>

update()

Return an instance with updated record.

public update(array<string, mixed> $Data) : static
Parameters
$Data : array<string, mixed>

The update data.

Tags
throws
DatabaseException

If error.

throws
ValidationException

If invalid.

Return values
static

        
On this page

Search results