Refactor and enhance database and form operations

Significant changes have been implemented in the database operations, particularly in update and insert functions, ensuring more stable and efficient handling of queries. Form capabilities have been enhanced by adding new attributes for processing decimal steps, further improving data input methods. This update also includes considerable refactoring and security enhancements in the PDO class.
This commit is contained in:
stephan.kasdorf
2024-03-27 12:24:25 +01:00
parent a793f79798
commit e92091f235
27 changed files with 160 additions and 111 deletions

71
core/i/IPostgres.php Executable file
View File

@@ -0,0 +1,71 @@
<?php
namespace Nibiru;
/**
* User - stephan
* Date - 01.02.17
* Time - 19:03
* @author - alllinux.de GbR
* @category - [PLEASE SPECIFIY]
* @license - BSD License
*/
interface IPostgres
{
/**
* @desc returns the query by ressult
* @param string $string
*
* @return array()
*/
public static function query( $string = IOdbc::PLACE_NO_QUERY );
/**
* @desc returns the row by id
* @param bool $id
*
* @return array()
*/
public static function fetchRowInArrayById( $tablename = IOdbc::PLACE_TABLE_NAME, $id = IOdbc::NO_ID );
/**
* @desc returns row by column name and search parameter
* @param string $tablename
* @param string $column_name
* @param IMysql $
* @return mixed
*/
public static function fetchRowInArrayByWhere( $tablename = IOdbc::PLACE_TABLE_NAME,
$column_name = IOdbc::PLACE_COLUMN_NAME,
$parameter_name = IOdbc::PLACE_SEARCH_TERM );
/**
* @desc will return the last inserted ID
* @return integer
*/
public static function getLastInsertedID();
/**
* @desc fetch all fieldnames of the parameter tablename to an array
* @param string $tablename
* @return mixed
*/
public static function fetchTableFieldsAsArray( $tablename = IOdbc::PLACE_TABLE_NAME );
/**
* @desc will return all entries from the selected tablename
*
* @param string $tablename
*
* @return mixed
*/
public static function fetchTableAsArray( $tablename = IOdbc::PLACE_TABLE_NAME );
/**
* @desc insert array content into database
* @param string $tablename
* @param string $array_name
* @return mixed
*/
public static function insertArrayIntoTable( $tablename = IOdbc::PLACE_TABLE_NAME, $array_name = IOdbc::PLACE_ARRAY_NAME, $encrypted = IOdbc::PLACE_DES_ENCRYPT );
}