-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.php
More file actions
95 lines (85 loc) · 3.06 KB
/
code.php
File metadata and controls
95 lines (85 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Interfaces\Database;
use VDM\Joomla\Interfaces\Database\DefaultInterface;
use VDM\Joomla\Interfaces\Database\VersioningInterface;
/**
* Database Insert Interface
*
* @since 3.2.0
*/
interface InsertInterface extends DefaultInterface, VersioningInterface
{
/**
* Get the auto-increment IDs generated by the most recent INSERT batch.
*
* This method returns the ordered list of auto-increment IDs calculated
* from the last executed multi-row INSERT operation.
*
* Behavioral notes:
* - IDs are only valid immediately after an INSERT operation.
* - The order of IDs matches the insertion order.
* - AUTO_INCREMENT values are assumed to be sequential within a single
* INSERT statement (as guaranteed by Joomla-supported databases).
* - When `$reset` is enabled, the internal ID bucket is cleared after
* the values are retrieved.
*
* @param bool $reset Whether to reset the internal insert ID bucket
* after retrieval.
*
* @return array<int|string> The generated auto-increment IDs.
*
* @since 5.1.4
*/
public function insertids(bool $reset = false): array;
/**
* Insert rows to the database (with remapping and filtering columns option)
*
* @param array $data Dataset to store in database [array of arrays (key => value)]
* @param string $table The table where the data is being added
* @param array $columns Data columns for remapping and filtering
*
* @return bool
* @since 3.2.0
**/
public function rows(array $data, string $table, array $columns = []): bool;
/**
* Insert items to the database (with remapping and filtering columns option)
*
* @param array $data Data to store in database (array of objects)
* @param string $table The table where the data is being added
* @param array $columns Data columns for remapping and filtering
*
* @return bool
* @since 3.2.0
**/
public function items(array $data, string $table, array $columns = []): bool;
/**
* Insert row to the database
*
* @param array $data Dataset to store in database (key => value)
* @param string $table The table where the data is being added
*
* @return bool
* @since 3.2.0
**/
public function row(array $data, string $table): bool;
/**
* Insert item to the database
*
* @param object $data Dataset to store in database (key => value)
* @param string $table The table where the data is being added
*
* @return bool
* @since 3.2.0
**/
public function item(object $data, string $table): bool;
}