|
1 | 1 | <?php |
| 2 | +/** |
| 3 | + * The interface for the table. |
| 4 | + * |
| 5 | + * @since TBD |
| 6 | + * |
| 7 | + * @package StellarWP\Schema\Tables\Contracts; |
| 8 | + */ |
| 9 | + |
| 10 | +declare( strict_types=1 ); |
2 | 11 |
|
3 | 12 | namespace StellarWP\Schema\Tables\Contracts; |
4 | 13 |
|
|
7 | 16 | use StellarWP\Schema\Collections\Column_Collection; |
8 | 17 | use StellarWP\Schema\Columns\Contracts\Column; |
9 | 18 | use StellarWP\Schema\Indexes\Contracts\Index; |
10 | | -use StellarWP\Schema\Indexes\Primary_Key; |
11 | | -use StellarWP\Schema\Indexes\Unique_Key; |
12 | | -use StellarWP\Schema\Indexes\Classic_Index; |
13 | 19 | use Exception; |
14 | 20 | use RuntimeException; |
15 | 21 |
|
| 22 | +/** |
| 23 | + * Class Table |
| 24 | + * |
| 25 | + * @since TBD |
| 26 | + * |
| 27 | + * @package StellarWP\Schema\Tables\Contracts; |
| 28 | + * |
| 29 | + * @method static Generator<array<string, mixed>> get_all( int $batch_size = 50, string $where_clause = '', string $order_by = '' ) |
| 30 | + * @method static bool|int insert( array $entry ) |
| 31 | + * @method static bool update_single( array $entry ) |
| 32 | + * @method static bool upsert( array $entry ) |
| 33 | + * @method static bool|int insert_many( array $entries ) |
| 34 | + * @method static bool delete( int $uid, string $column = '' ) |
| 35 | + * @method static bool|int delete_many( array $ids, string $column = '', string $more_where = '' ) |
| 36 | + * @method static int get_total_items( array $args = [] ) |
| 37 | + * @method static bool update_many( array $entries ) |
| 38 | + * @method static array paginate( array $args, int $per_page = 20, int $page = 1, array $columns = [ '*' ], string $join_table = '', string $join_condition = '', array $selectable_joined_columns = [], string $output = OBJECT ) |
| 39 | + * @method static mixed[] get_all_by( string $column, $value, string $operator = '=', int $limit = 50 ) |
| 40 | + * @method static ?mixed get_first_by( string $column, $value ) |
| 41 | + * @method static ?mixed get_by_id( $id ) |
| 42 | + * @method static array operators() |
| 43 | + * @method static mixed cast_value_based_on_type( string $type, $value ) |
| 44 | + */ |
16 | 45 | abstract class Table implements Table_Interface { |
17 | 46 | use Custom_Table_Query_Methods; |
18 | 47 |
|
|
0 commit comments