Documentation

CloudPostgreSQL
in package

Class to handle PostgreSQL connection Feel free to use a distribute it.

last-update 2022-12-29

Table of Contents

Properties

$_affectedRows  : mixed
$_cloudAutoSelectFields  : mixed
$_cloudDependences  : mixed
$_cloudFilterToAvoidCalculation  : mixed
$_cloudFilterWhereFields  : mixed
$_cloudReferalFields  : mixed
$_cloudWhereFields  : mixed
$_db  : PDO
$_dbCharset  : mixed
$_dbName  : mixed
$_dbPassword  : mixed
$_dbPort  : mixed
$_dbProxy  : mixed
$_dbProxyHeaders  : mixed
$_dbServer  : mixed
$_dbType  : mixed
$_dbUser  : mixed
$_debug  : mixed
$_lastExecutionMicrotime  : mixed
$_lastInsertId  : mixed
$_lastQuery  : mixed
$_lastRes  : mixed
$_limit  : mixed
$_onlyCreateQuery  : mixed
$_page  : mixed
$_qObject  : mixed
$_queryFieldTypes  : mixed
$affected  : mixed
$arrayedResult  : mixed
$cfmode  : mixed
$error  : mixed
$errorCode  : mixed
$errorMsg  : mixed
$rawResults  : mixed
$records  : mixed
$result  : mixed
$_dblink  : mixed
$core  : mixed

Methods

__construct()  : mixed
Class Constructor
addError()  : mixed
Add an error in the class
close()  : mixed
Close the opened connection
connect()  : bool
Init a PDO connection with the database
getDataFromQuery()  : mixed
joinQueryValues()  : array<string|int, mixed>|mixed|string|array<string|int, string>|null
Join $values array with $q string wich contains %s elements
loadCoreConfigVars()  : mixed
Load variables from $this->core->config
scapeValue()  : string
Apply $this->_db->real_escape_string or addslashes if there is not db objext
setConfiVars()  : mixed
Set ConfigVars for connection
_buildQuery()  : array<string|int, mixed>|false|mixed|string|array<string|int, string>|null
Build a Query receiving a string with %s as first parameter and an array of values as second paramater

Properties

$_cloudAutoSelectFields

public mixed $_cloudAutoSelectFields = array()

$_cloudFilterToAvoidCalculation

public mixed $_cloudFilterToAvoidCalculation = array()

$_cloudFilterWhereFields

public mixed $_cloudFilterWhereFields = array()

Methods

__construct()

Class Constructor

public __construct(Core7 &$core[, array<string|int, string> $options = ['dbServer' => '', 'dbUser' => '', 'dbPassword' => '', 'dbName' => '', 'dbPort' => '5432', 'dbCharset' => ''] ]) : mixed
Parameters
$core : Core7
$options : array<string|int, string> = ['dbServer' => '', 'dbUser' => '', 'dbPassword' => '', 'dbName' => '', 'dbPort' => '5432', 'dbCharset' => '']

addError()

Add an error in the class

public addError(string $code,  $message) : mixed
Parameters
$code : string
$message :

connect()

Init a PDO connection with the database

public connect([mixed $options = [] ]) : bool

reference: https://www.php.net/manual/en/pdo.connections.php

Parameters
$options : mixed = []
Return values
bool

True if connection is ok.

joinQueryValues()

Join $values array with $q string wich contains %s elements

public joinQueryValues( $q,  $values) : array<string|int, mixed>|mixed|string|array<string|int, string>|null
Parameters
$q :
$values :
Return values
array<string|int, mixed>|mixed|string|array<string|int, string>|null

loadCoreConfigVars()

Load variables from $this->core->config

public loadCoreConfigVars() : mixed

scapeValue()

Apply $this->_db->real_escape_string or addslashes if there is not db objext

public scapeValue( $value) : string
Parameters
$value :
Return values
string

setConfiVars()

Set ConfigVars for connection

public setConfiVars(mixed $configVars) : mixed
Parameters
$configVars : mixed

_buildQuery()

Build a Query receiving a string with %s as first parameter and an array of values as second paramater

private _buildQuery( $args) : array<string|int, mixed>|false|mixed|string|array<string|int, string>|null
Parameters
$args :
Return values
array<string|int, mixed>|false|mixed|string|array<string|int, string>|null

        
On this page

Search results