1111 * A helper class for registering StellarWP Schema resources.
1212 */
1313class Register {
14+
1415 /**
1516 * Register a field schema.
1617 *
1718 * @since 1.0.0
1819 *
1920 * @param string|Fields\Contracts\Field $field Field class.
2021 *
22+ * @throws \StellarWP\DB\Database\Exceptions\DatabaseQueryException If the query fails.
23+ *
2124 * @return Fields\Contracts\Schema_Interface
2225 */
2326 public static function field ( $ field ) {
@@ -46,6 +49,8 @@ public static function field( $field ) {
4649 *
4750 * @param array<mixed> $fields Fields to register.
4851 *
52+ * @throws \StellarWP\DB\Database\Exceptions\DatabaseQueryException If the query fails.
53+ *
4954 * @return Fields\Collection
5055 */
5156 public static function fields ( array $ fields ) {
@@ -63,6 +68,8 @@ public static function fields( array $fields ) {
6368 *
6469 * @param string|Fields\Contracts\Schema_Interface $field Field Schema class.
6570 *
71+ * @throws \StellarWP\DB\Database\Exceptions\DatabaseQueryException If the query fails.
72+ *
6673 * @return Fields\Contracts\Schema_Interface
6774 */
6875 public static function remove_field ( $ field ) {
@@ -89,6 +96,8 @@ public static function remove_field( $field ) {
8996 *
9097 * @param string|Tables\Contracts\Schema_Interface $table Table Schema class.
9198 *
99+ * @throws \StellarWP\DB\Database\Exceptions\DatabaseQueryException If the query fails.
100+ *
92101 * @return Tables\Contracts\Schema_Interface
93102 */
94103 public static function remove_table ( $ table ) {
@@ -115,6 +124,8 @@ public static function remove_table( $table ) {
115124 *
116125 * @param string|Tables\Contracts\Table $table Table class.
117126 *
127+ * @throws \StellarWP\DB\Database\Exceptions\DatabaseQueryException If the query fails.
128+ *
118129 * @return Tables\Contracts\Schema_Interface
119130 */
120131 public static function table ( $ table ) {
@@ -143,6 +154,8 @@ public static function table( $table ) {
143154 *
144155 * @param array<mixed> $tables Tables to register.
145156 *
157+ * @throws \StellarWP\DB\Database\Exceptions\DatabaseQueryException If the query fails.
158+ *
146159 * @return Tables\Collection
147160 */
148161 public static function tables ( array $ tables ) {
0 commit comments