Update database operations and form capabilities

Database operations have been redefined and additional functionality has been added for handling database queries. Functions for updating rows by ID and inserting array into table have been updated for better reliability. In addition, new form attributes for managing decimal steps have been added to enhance data input capabilities. Refactoring and security improvements have also been addressed in the PDO class.
This commit is contained in:
stephan.kasdorf
2024-03-21 16:25:13 +01:00
parent a7ce13334c
commit a793f79798
6 changed files with 147 additions and 29 deletions

View File

@@ -9,6 +9,14 @@ namespace Nibiru\Adapter;
interface IDb
{
/**
* @desc will update the a row with the $rowset parameter by the given id
* @param array $rowData
* @param int $id
* @return mixed
*/
public function updateRowById( array $rowData, int $id );
/**
* @desc updates a row by a given field and field where search value
* @param false $wherefield

View File

@@ -52,6 +52,8 @@ interface IForm
const FORM_ATTRIBUTE_PATTERN = 'pattern';
const FORM_ATTRIBUTE_ANY = 'any';
const FORM_ATTRIBUTE_HREF = 'href';
const FORM_ATTRIBUTE_TS_DECIMALS = "data-bts-decimals";
const FORM_ATTRIBUTE_TS_STEPS = "data-bts-step";
/**
* @desc loads the current Form element to the form

View File

@@ -15,6 +15,7 @@ interface IMysql
const PLACE_NO_QUERY = "NO QUERY";
const NO_ID = false;
const PLACE_TABLE_NAME = "NO TABLENAME";
const PLACE_ARRAY_NAME = "NO ARRAY";
const PLACE_QUERY_LIMIT = "NO LIMIT";
const PLACE_SORT_ORDER = "NO ORDER";
const PLACE_DSN = "NO CONNECTION STRING";