Метод |
Описание |
|
__construct ( string $table_name, string $sql_file = '' ) |
Create an instance of __WPDKDBTable class |
|
_select ( object $query = null, string $order_by = '', string $order = 'ASC' ) : array |
Return an array key-value with key as primary key of records. |
|
count ( string $distinct = '', array $status = '' ) : integer | array |
Return the integer count of all rows when $distinct param is emmpty or an array of distinct count for $distinct column. |
|
delete ( integer | array $pks ) : integer | boolean |
Delete one or more record from table. Return the number of rows affected/selected or false on error. |
|
deleteWherePrimaryKey ( $id ) |
|
|
groupBy ( string $column, boolean $order_by = true, string $order = 'ASC' ) : array |
Return a column select group by and sorter |
|
map ( object $source_row, object $destination_object ) : object | boolean |
Map the properties fields of single database row into a destination object model. |
|
primaryKey ( ) : string |
Return the name of the primary key |
|
select ( integer $id = false, $order_by = '', $order = 'ASC', $where = '' ) : object | array |
Return a single instance of $object class or an array of $object class. FALSE otherwise. |
|
selectWhereID ( $id, $object, $output = OBJECT ) |
|
|
update ( ) : boolean |
Do an update the table via WordPress dbDelta() function. Apply a new SQL file on the exists (or do not exists)
table. Return TRUE on success |
|
where ( WPDKDBTableRow $query, string $prefix = '' ) : string |
Return the WHERE condiction string from a object |
|